I too get haunted by criticism, failed relationships (but not those sexual types;) with past coworkers, or my poor judgement and decisions in past projects.
Q: Was I really as bad as accused?
Q: Did I make such an embarrassing mistake?
Q: Was I more than 50% responsible or there’s another person equally responsible? It takes 2 hard objects to have a clash.
In many cases, I find it tricky to answer these questions objectively, and identify where and how much of blame I deserve. I’m lucky to have a simplistic view —
“I have always enjoyed good relationships with all my team members under the same manager. Everyone is friendly, nice or at least OK with me. Similarly, all my users liked me. Some colleagues and users even treat me as the best guy in my team.“
In reality, if I examine every relationship maybe this is not 100% true, but i’m too lazy, so I never challenge this view. I keep repeating this view to myself and to everyone who asks. This loose view is a rather powerful protection when I feel “haunted”. This view may be naive but it’s an example of a healthy self-image IMO.
Note in this view I don’t single out my boss. I don’t have such a perfect thing to say about relationships with my past bosses. Still I have another simplistic view that
“Those managers I had problem with is an unpopular guy. Each has lost more than 1 team member due to the harsh mistreatment he gives. Each is hated by some team members and not respected by many. Basically, each is a difficult boss, but I actually managed to survive and adapt to them for longer than many fellow sufferers.“
These simplistic views tend to protect my self-image. It’s important to me. They are like Guardian Angles. I hope they could work for you as well.