Rejection and being "friendzoned" happens to a lot of guys. In high school, I knew guys who were rejected much more often than I was, yet weren't as deeply affected as I was. It didn't cause them to doubt their value as a human. I think it was because they didn't think dating success was a measure of their value. Maybe this resilience is something they learned, or maybe I learned
not to be resilient. Either way, it kept them in the market and functioning and even acting happy (I don't know what was going on in their head) long after I would be crying in a toilet stall and thinking very bad thoughts.
There is also the theory that if you swing at enough balls, though you may strike out a thousand times, eventually, you'll get a hit. Not letting strike-outs prevent you from swinging is resilience. Though, you
should try to learn from every attempt. (I didn't swing at many balls in high school. Count them on the fingers of one hand.)
I had to leave home and live in a radically new environment to change it. Big liberal city, clubs I shared interests with, and enough anonymity and impersonality that a mistake with one girl wouldn't poison the entire pool. Things got better, though I was never the guy who could walk into a party and probably leave with a girl on his arm. Spent most of my evenings alone.
At some point, you have to accept that you have nothing to lose. If you ask a girl out and she says no, you are in exactly the same place you'd be if you hadn't. Even if you've spent a lot of time in the effort, you still need to realize there's no point in betting your self-esteem on it. You have lost nothing but whatever time you spent wooing her. It is difficult to do this attitude adjustment if you have learned that you have to hear "yes" or you are a failure.
I do my thing and you do your thing. I am not in this world to live up to your expectations, And you are not in this world to live up to mine. You are you, and I am I, and if by chance we find each other, it's beautiful. If not, it can't be helped. — Fritz Perls