my ex

I was in a relationship a couple of months ago. We had alot of fights and I did cry a lot but he made me the happiest girl ever. We broke up twice (I ended it then got back with him) but we ended permanently and I got over it but recently I’ve been thinking about him and how things used to be and because all my friends are getting into serious relationship. Help?!!!? What do I do to get my mind of him again.