Allow yourself to indulge in tears and reminiscence. Take advantage of friends' offers to lend you a shoulder on which to cry. However, set yourself some limits on these types of moments. When you have listened to music, looked at happy photographs and cried, force yourself to do something to help another person. Not only is this a kindness, but it will succeed in shifting your focus from your own situation, if only for a while. Helping someone else also will do wonders for your self-esteem, which is likely to be low at this time.
Stop imagining reconciliation scenes. Avoid places and activities that are associated with your ex. Stop yourself from late-night texting and phoning. Tell yourself how much better you will feel tomorrow if you stop. Focus on maintaining your dignity, though this may be hard. If you have been rejected and humiliated by the other person, tell yourself that the best revenge is to be happy.
Accept invitations and go out, even if this is the last thing you feel like doing. You will be glad you made the effort. Every time you find yourself viewing the past through rose-colored glasses remind yourself of the things that were so wrong about the relationship. This might seem like a negative thing to do, but it will force you to take a more realistic view of the relationship that has ended. This will help you to move forward.