Yes, distance and time! Maybe one way to think about it is not as dumping your boyfriend and ending the relationship (which focuses on your loss, because you obviously still have feelings for him) but as gaining the chance to make a happy, healthy life for yourself (which focuses on what you are doing for YOU, and you alone).
And really - adding a bunch of new young women as Facebook friends four days after the final breakup with his girlfriend? This man is not relationship material.