I guess it's like ADHD in that way: I thought I was just a lazy sack of shit until I found out I have a condition that I can treat with a pill. Then I could merely accept that it's not something I have control over, and I could move on.
Funnily enough no matter how great my life is nor how confident I feel, every once in a while a catastrophic fear of rejection will leap into my chest and I suddenly feel like I'm that poor terrified 15-year-old me, and I have to shake it off. I have much better tools for dealing with it now that I don't see it as part of my identity, much like I don't see myself as lazy.
Turns out I had AuDHD and I was masking (pretending to be neurotypical when around people). Can't tell you how exhausting that is. I cut off all my friends and couldn't be happier since.
Some people are simply not wired to socialize.
Before I had my ADHD diagnosis, I just assumed that I have social anxiety and tried to fix it myself by giving me exposure therapy. I would force myself to seek out any social interaction regardless on how I felt.
The result was that I got worse, so much worse because I was basically trained myself to disregard my emotions. Turns out being undiagnosed with ADHD is traumatizing. I did not imagine that people hated me for being different, I never had any phobia. It wasn't "just in my head". The truth is that I am different and lots of people will instinctively hate me for being neurodivergent. I just needed to learn to deal with that.
That is why a correct diagnosis is so important. I despise that people are given generic diagnosis like depression or anxiety instead of digging deeper and trying to find out what actually causes them.