Firstly, you need to get over denial and admit that it’s over and you guys are not getting back.
Keep yourself occupied and try not to think about your ex too much. He/She is probably having fun all this while, why shouldn't you?
Clean out your apartment and dispose off anything belonging to your ex. If you stick to anything sentimental, it will continue to hold you back.
Send your ex’s belongings back to her/him right after the breakup as it will be virtually impossible for you to avoid your ex when he/she comes to pick the stuff up.
Avoid mutual friends, especially those who sided with your ex. If you continue meeting up with them, you won't ever move on from your ex.
Delete and remove his/her contact details from your phone and computer. If you know you can your ex anytime, you may find it hard to ignore him/her.
You may think sending him/her an e-mail appears casual, but it doesn’t. It makes you look desperate for him/her - something no one with self-respect would want.
Stop texting your ex. After you have had a breakup there is literally no point in texting her/him just to say hi.
If you both use the same gym, or jog at the same park, you might want to switch places if you want to avoid running into him/her.
Stop visiting your ex’s favourites places to eat or shop.
If you both happen to study or work at the same place. Just try to act casual and don't feel the need to acknowledge him/her every time you guys come across.
If you are finding it hard to avoid your ex, you can sit down and talk to him/her. Voice your concerns and tell him/her in clear terms that the relationship is over as far as you are concerned. This might be the closure your ex needs to stop trailing you.