Mefisto - I constantly have problems with bad thoughts taking over. What helps me is, to become VERY AWARE of when they do, and then telling myself to STOP thinking those thoughts. I even "yell" at myself, mentally, to shut up.
When the bad thoughts come.....I shut them down as best I can, and then close my eyes and focus on finding a good thought to replace it. Sort of a meditation thing. It doesn't wipe out the bad stuff, but it does kind of knock the brain off it's tracks of negativity. I feel like I am training my mind to think happy / positive instead of negative. And it really does help me.
Before I started doing this, I realized I had lost YEARS of any good memories what so ever. I'd look back on life, and all I could see / feel / remember was the bad stuff. But since I started re-training my mind to remember and hold good things, I've gotten better at having happy memories.
It sounds cliche'd, but, it really does take time to heal the hurt you've suffered. It also takes work, on your part, to make sure you don't get stuck down in a pit of pain. So trust the people here, when they tell you that the pain will lessen, and that you can move on from it, and that yes, it is possible to find someone worthy to love, and to be friends with. Two people who used to be in your life screwed up, and hurt you horribly. That's just two people. Just the number of folks who have responded to you here all ready outnumber that!