How to get over your ex

I don't know how I will ever get over my ex. He was my first "real" boyfriend. How do u get rid of the thought of him being happy with someone else. (I know that sounds selfish)