1) Release all negative thoughts
Avoid all the negative thoughts that comes into your mind. Don't always see the negative side of the situation and don't keep on blaming yourself for that. Try to keep all the negative thoughts away from you and see the positive side of the whole situation. You can also opt for doing meditation to avoid negative thoughts from you.
2) Talk to your close friend or trusted one
This is the situation when you find yourself completely alone but there is always someone with whom you can share your feelings and have shoulder to cry if you want. Don't stay alone during this time, just go out and meet your friend and tell him/her each and every thing. This will make you feel good and that friend will also help you out from the situation of heartbreak.
3) Get rid of all the stuff and things that will remind you of your ex
Keep all the things that takes your mind towards him/her like photographs of your ex, all the gifts that you received from your ex etc. Try to get rid of all such stuff otherwise it will keep you remembering about your ex again and again and will become difficult for you to come out from that situation.
4) Stop all the contacts with your ex
After breakup don't try to stay connected with your ex otherwise it will make you feel even worse than you already do. Staying connected with your ex will make you weak and you'll not be able to move on, so it's better to completely avoid having any sort of connection with your ex. After some time you'll come out as a strong person and will lead a happy and prosperous life.