I posted upthread under my old name. Just thinking about this further and realising it's very, very similar to something I went through.
It is so hard to get your head around and leaves you feeling that perhaps you are toxic. At the very moment you want to take care of the person you love, they tell you that the best thing you can do is get the hell out of their life. You're left trying to mourn someone who hasn't died but who appears to have morphed into someone else. I found that terribly difficult to do. The only way it made sense was if I blamed myself for someone driving him to it, but that didn't make sense either.
If there were problems in the relationship there is a decent, kind way to bring that up and deal with it. If he wanted to split up, there is a decent way to do that, too. There is absolutely no excuse for sudden, cold hatred, other than that it's fulfilling some kind of need in the other person. Like someone who cheats and feels the need to paint their partner as cold and loveless in order to justify their behaviour, for instance.
I used to do a lot of thinking about this but now I'm just thankful my ex DP isn't my problem anymore. He was more than sufficiently self-absorbed for both of us, and doubtless has spent a long time explaining his psychological state of many others in the decade since that happened! Looking back, I wish I'd been a bit tougher and able to say, 'No, actually, there's no excuse for how you are behaving. I thought I knew you but plainly I was wrong. There is another side to you that is pretty vicious, embittered and self-indulgent. Move on.'
If you spend ages and ages drawing conclusions about yourself as a result of all this, you are only going to be allowing his issues to become your own. That will mean he has the chance to screw up whatever happens next in your life - when really, he should be apologising sincerely for breaking your heart and wishing you well for whatever happens next.