Think CBT might be beneficial.  The premise behind CBT is: you can't stop the thoughts but you can stop what you do with them (if that makes any sense).  You can even get hold of books that will "train" you in CBT and deal with techniques designed for problems like these.  Good luck.