can't get him outta my head!

I stopped talking with this guy at the end of October who I really liked like majorly. He made me laugh and I just looked forward to talking to him. Anyway we stopped after we had a disagreement but he apologised after a while and suggested a second chance but it never really continued. It's been months and I still think about him! It's so annoying he pops up now and then in my head and I miss him loads. Why can't I stopped? It's just all of a sudden I was alright before. Could it just be I'm feeling lonely or something?
I mean I could message him but it's been so long he most likely would've moved on.