I relate to this thread a lot. I have been stuck in some crazy, awful thought loops in my day...
This is a little embarrassing, but when I was in fourth grade I saw the movie Carrie, based on the Stephen King book... and let's just say, the mother character hit a little close to home, and I basically could not stop thinking about that movie for... a year or two. It was really, really bad. I had some bad nightmares about it, so I feared sleep. I would, of course, forget about it for long stretches of time, but it would not be uncommon at all for me to fear going to bed all day long... I can't believe I didn't go insane.
Anyway, it's bad stuff, but there has been some amazing advice in this thread. Embracing the thoughts is so important, and closure is also important. Trying not to think about the thoughts will just make it 10x worse, so the worst thing you could do would be to struggle against it. Unfortunately, another requirement, I think, is time. It just took some time. Now I watch Carrie and enjoy it, actually... it's a very well done film... but it was many years before I could do that. I used to think about failed relationships etc., all the time, but those scars heal in weeks, months, or years depending on the circumstances. So yeah, give it time.
Anyway, nice thread.