getting over an ex

My ex and I broke up about a month ago... I think about him all the time and it is truly the worst because he straight up told me he had no feelings for me anymore... 
We were together for almost four years. 
What's the best way to get over him? Or to at least help me stop thinking about him.