he broke up with me and I can't get over it.

He did it yesterday over text. First he said we needed to talk in person and then he just dumped me. I haven't heard from him since yesterday afternoon. We had our issues but the thing is he said he'd always give me a chance to improve things yet every time I did he wasn't satisfied even though I've done so much for him, from seeing him as frequently as he wanted to taking his word for an answer after a period of distrust and telling him he'd meet my family next week. It was a yearlong relationship. 21/22. Now he's on twitter liking stuff about giving people three chances and then they're done, but how was it a chance if he just wanted more and didn't help me at all, only criticized my efforts. He said he was unhappy and my efforts weren't enough and that he wanted to be able to play video games and go to bars whenever he wanted and that I was being too negative, when I was actually the hopeful one and he jus didn't have the heart to work on anything. I feel so crappy. I don't know what to do. He was my first serious relationship, love and best friend, yet he managed to dump me days before finals. I can't sleep or stop crying. How do I get over this when he's okay.