Thats an interesting story. It obviously caused more problems for you than anything good.
How did you manage to get over it?
I got over it by completely re-evaluating who I was, what kind of person I wanted to become, and everything that I believed.
Imagine your beliefs as physical objects. You pluck them all out of your head and spread them out on a big table where you can look at them objectively, because they're no longer in your head, coloring your perception. Some of them are true, some are false. Some are beautiful, some are ugly. Some align with who you are, some do not. Some align with the kind of person you want to be, some do not. You survey them all, then collect the ones you want to keep. The true ones, the beautiful ones, the ones that reflect your true nature, and the ones that reflect who you want to be. Then you walk away, leaving the rest behind.
That, metaphorically, is what I did, or at least tried to do the best I could. The process was partly self discovery, and partly self creation. And in the discovery part of that process, I found that when I looked at myself without the lens of indoctrination, what I saw were things like kindness, intelligence, curiosity, creativity, honesty, a sense of awe and wonder, an appreciation for beauty, a deep capacity to love, and a strong sense of right and wrong. Of course, I saw flaws too. I'm very introverted and insecure, which makes it hard for me to meet and interact with people. I don't handle stress well. I'm prone to anxiety. I try to always be rational, but sometimes react emotionally and end up saying things that I regret. That happens here sometimes. Sorry. But all in all, what I saw was a basically good person. A nice guy. Not a freak. Not an abomination. I stopped hating myself. In fact, I kind of like me. Including the sexual part.