you gotta find a better place to spend your time!
i know that is easier said than done.
are there some good memories that you can consciously choose to think about? Could you read a book with a really fascinating plot? if you watch movies, does that help? when you are talking with someone else, does that keep your mind off the subject? do you have a job or hobby or sport or some kind of activity that can keep your mind engaged in something more positive?
do you have a counselor or therapist who could help you? if not could you find someone who is qualified to help with your issues?
I hope others might have some good suggestions too...
"That you are here - that life exists, and identity; that the powerful play goes on and you may contribute a verse. . . What will your verse be?" Robin Williams as John Keating in "Dead Poets Society"