Missing Him

I've been thinking about my ex a lot lately. He left me almost 7 months ago and we haven't spoken since. I still don't know why he left me and that made it really hard for me to move on because I felt like I had no closure, but I accepted it and moved on eventually. We were together for over a year. How can I get him off of my mind?