Instead of keeping your focus on all the exciting romance you had together (or any warm, cozy thoughts you cherish), you have to (sometimes) replace those thoughts with the negatives about him. His leaving randomly was a negative. It showed he lacked character. What else did he do that was selfish? I'm not saying you should dwell on these negatives all the time, because the LAST thing you want to feel is bitterness, but you have to remind yourself of them from time to time, especially when your heart strings are tugging you to think of how perfect he was in so many other ways.
Having said that, the heart goes where it wants to go. Some of us take a long time to get over someone we love. In some ways, that's a good thing. It can mean you have a big heart, hold no animosity, and can eventually heal in a balanced way, rather than a bitter way. Also, when you finally do let go, you can feel good about it because: you have faced the reality regarding his not so good side, and you'll feel confident in the knowledge that you deserve better.
Whatever happens, never feel bad about not being able to get over him right away.