You sound like you're dealing with the same thing as me. I've had a lot of failed friendships. I figured out over the last year that I have both Autism and ADHD. I realized this at 41.
I notice now that if I try to open myself up and "put myself out there," I feel like I trigger some PTSD. I get very anxious and filled with so much despair that I tend to just withdrawal again.