Try distracting yourself with something. What has worked for me (and quite well) is responding to threads.. It takes my mind off my issues and I"m able to direct my thoughts onto someone else's issues where I have to think about my response..
That sounds super wordy..
You can try intense exercise, but I don't find that works as well. It's temporary and the thoughts come back when I'm done...
Also, take a look at this for distracting skills.
http://www.dbtselfhelp.com/html/accepts.html