Distract yourself from thoughts relating to the affair.
eg: start learning something new
take up some form of art-like painting/playing guitar
engage in activities that increase your self esteem-such as charity, welfare of others, donations
Remind yourself that all bad times come to an end-sanskarayo anithyaine; bad times are also sanskara
Go on a refreshing trip, preferably to a place of natural beauty like a wild life park, preferably with just one or two understanding friends who would give you some personal space
Good luck.