Help! What to do?

Hi ladies, I'm hoping to get other perspectives on my situation to hopefully help me get over an ex.

Background story:

My ex and I got together a few months ago and there was chemistry immediately. I had only been single for three months since I ended a very toxic three year relationship that I had no problem getting over. I never even cried about it. So my ex and I hit it off right away, he was absolutely amazing! He was the most kind, romantic, smart, caring, and patient person I had ever met. He was truly "it" for me and I knew it right away. Three weeks into talking he hinted that he wanted to say those three big words, a week later when we made it official he did. We spent everyday together, had so much fun no matter what we did, he even told me maybe two weeks into dating that he knew I was the girl he was going to marry and spend the rest of my life with. Everything was moving fast but it was perfect. Then, we started arguing about his ex's. I let my insecurities get in the way and I was worried that they were constantly around as the one had previously tried to get involved in his most recent relationship before ours. Now I'm not typically the type of girl to worry about other women, but the fact that his friends told me she was still obsessed with him, three years later, refused to date anyone else and tried to ruin his last relationship obviously freaked me out. When I would bring up the topic he would just flip out, there was no talking about it, he just went from 0-100. So one night, about two months into dating we bickered about a minor miscommunication over text. He replied "I'm done with this" so I asked if he meant us and he said he'd never do that to me. Two hours later I got a text saying he was done with me. This was a little over a month ago. So we met up, talked and once again he just screamed at me the entire time, saying everything was my fault, that I'm a slut/whore for no reason. Two days later he got back together with me but acted weird saying we couldn't make it fb official again and no tagging each other in anything. I agreed because I wanted him back. We had sex that night and the next morning I woke up to a break up text four days after he just broke up with me for the first time. So, trying to win him back in any way I could I changed everything he said was wrong with me. I stopped being so insecure, I worked on my communication, I started acting more positive and it seemed as every time I fixed one issue he was complaining about something else. In this past month we've been hooking up a lot, and talking. He told me two weeks ago that he was sorry, that I was never the problem and that he was deflecting, that he never wanted to lose me so he was trying to work on himself. The next day he picked me up from a bar and told me I was a slut because of my outfit and that I deserved to be raped. Being blind I still tried to work on me for him. Last weekend, I called him crying from a bar due to guys not leaving me alone. His response "you knew what you were asking for because of how you dressed". So we got over it and Wednesday he told me how even though we're taking space that he could never stand to see me with someone else, that it would absolutely kill him on the inside, and I finally felt like the old him was coming back. The next day he blocked me on everything, no warning, no reason. So I called him and he told me he no longer wanted me, didn't care who I fucked, that I was trash and was a slut/whore saying that my mouth got around more than anything. I've never heard someone so angry before, and it broke my heart. Since then I've blocked him on everything, no more hooking up or talking. He told me I'm not allowed to hang out with my friends if he's around them because we have mutual friends. I just feel so lost and confused and honestly heartbroken. What happened to the most amazing man I've ever met who wouldn't hurt a fly? Why does he keep flipping out of no where after saying one thing then a day later saying the opposite? I miss him so much, I can't stop thinking about him, but I know I need to. There's no excuse for saying I deserve to be sexually assaulted and that I am a whore/slut. I'm sorry for venting, but I'm looking for other points of view here, did I do something wrong? Why does he change and flip out of no where? I feel like such a failure for this, because deep down I just know he's the one. **Also I am 21 he's 29