It is important to realize the why probably was not anything that you did wrong. I understand the dwelling on it and trying to figure out the clues because realistically anyone would. The truth is that only he knows the truth and you'll probably never know why. Since he was involved with this other woman due to drugs and he was acting strange the last few days, I do wonder if it's possible it was withdrawal and coming to the realization that he wouldn't be able to keep hiding all this because maybe he literally couldn't. It might have been too hard to go without. It is hard to say for sure, just a best guess from what was said. I really doubt it had anything to do with you unless it was realizing how wonderful you are and how horrible he was for messing it all up.