I'm a new guy here but if I may jump in here and just give a short reply. You've been given some great advice by others who are likely more qualified than I, but from reading quite a few of your posts it's clear to me you're an intelligent and insightful man. Try to find a way to stop beating yourself up.
A family member very close to me recently asked in a discussion if I ever planned on getting back in the dating game and finding someone to spend the rest of my life with(I'm 56). My reply, without even thinking about it, was that I felt I needed to learn to be comfortable with and love the person I am before getting involved with anyone else. It took two failed marriages before I finally realized the importance of accepting me for me, despite the flaws. Hope this makes just a little sense.
Hang in there, and just try being yourself. Don't put on false airs or try to hard to impress anyone. I don't think quality relationships, be they romantic love or strong friendships, are something you "find", but recognize and accept when they come to you. I'm still on this long journey to learn how to love and be loved in a healthy way. With all of your and other's support and insight here I've little doubt I'm "on my way."
“What lies behind us and what lies before us are small matters compared to what lies within us.”- Ralph Waldo Emerson
"Beneath the dust and love and sweat that hangs on everybody
there's a dead man trying to get out."- Adam Duritz