This did happen to me as well, except that the person wasn't my ex, just someone I used to love before my current boyfriend. We were online friends for a couple of years but once I mentioned that I'm now in a relationship, the behavior towards me changed drastically and I ended our friendship because it hurt me too much. A few months later I began to visit their profile everyday, because I realized I've been lied to all this time and I wanted to find out who this person really is. I never hid from my boyfriend what I was doing but in the end I decided to listen when he finally told me to let go because it makes no sense and it might grow into an obsession, if it hadn't begun to already. And now I'm working on that.
So I pretty much made it a New Year's Resolution. I still have the itch some days but I know I shouldn't dare scratch it because I am aware it's not healthy.