These things happen alot so don't feel too bad about it.
The worst thing you can do is bringing yourself down with that situation.
I had a similar situation where I got into an argument with a good friend where I overreacted when she posted something unpleasant on social media. Feeling upset, I confronted her about it which led to her blocking me not only on social media but purposely ignoring me IRL completely like I'm a brick wall.
Got upset over it for nearly a year because I still saw her as a friend and despite my attempts to apologise, she still treated me like I don't exist.
For the next three months, I began taking out my frustrations and anger on some of our mutual friends and ended up carrying a bigoted view towards people sharing the same ethnic and mannerisms as her. I even started cutting people away despite their willingness to help me back onto my feet.
Took me nearly 4 months to realise I was dragging myself down. With a lot of support from my good friends, I slowly began accepting others instead of shutting people away and I started mending my relationships.
Right now I'm over the whole thing but I still haven't resolved the issue with that girl yet. The point of me telling you my story is that despite whatever life throws at you, it's very important to not dwell on the issue and to move on. Don't do what I did, by that I mean be an ass and treat everyone else like how the object of your pain treated you.
Personally I find music and reading extremely helpful to ease your troubles, may not be the case for you but try to find something you enjoy alot to take your mind off him.
Hope my story helps.