Heartbroken

I broke up with my boyfriend about a month ago. I'm not over it. I think about it daily, thinking about what I did wrong and how I could have fixed it if he had gave me time to do so. I don't know what to do to get over it. I'm getting tired of crying about it and thinking about him. What are ways to get over a broken heart?