This will depend so much from person to person and on how long you were together. The longer you were together and how much you relied on each other emotionally or how loving your relationship was, will give a scope of how long it might take. Despite of it all, you will have to cut all communications with him and understand that the relationship is over.
Sometimes it never goes away, it's hard to forget. My friend used to say that there is only one first love, all the rest is just it's little reflections. Try to get distracted, that's what online dating is for ( like dream marriage and zoosk)