Ok, I'll add in my experience...
I was at a point in my life just a few years ago where my lankiness was
unacceptable. Combine that with Pectus Excavatum and it just about pushed me over the edge. I even got tested for Marfan Disease, a connective tissue disorder that causes people to grow very tall and thin.
I have had little kids look up at my 6'3" figure and say something along the lines of "You're really skinny!" I'm that skinny.
My skinny body being unacceptable, I dove hard into a weight gain program that involved a strict regimen of protein rich meals, supplementation (all safe and legal) and weight lifting. It took me about two years to realize I wasn't going to get what I wanted out of life doing this. No matter how much weight I gained, it wasn't enough. I had to accept that I was always going to be skinny, but I couldn't accept it.
It consumed me. I felt so trapped because of it. It was something about me that I couldn't seem fix no matter how hard I tried.
Fast forward to now. I don't mind that I'm skinny anymore. I don't like it and I never will, but it's not something that's on my mind all the time like it used to be.
How did I get from unacceptable to acceptable?
CBT for my social anxiety and specifically for my feelings about my body.
Before I started CBT for my social anxiety, I blamed all my problems on concrete things. For example, I don't have a woman in my life because of my body.
Doing CBT helped me realize that those really had nothing to do with it. Sure, some women wouldn't be interested in me because of my skinny body, that's fine, I don't expect all women to be attracted to me just as I'm not attracted to all women.
Early on some of my behavioral exercises included taking off my shirt at a beach, something that was profoundly terrifying for me. One of the later "behavioral exercises" was an intimate relationship with woman I found very attractive. She didn't even care about my skinniness or my Pectus Excavatum.
I still notice that people look at me and notice how lanky I am, but I honestly just don't care anymore. I can point directly to the CBT I did for that.
Look, I know that I can't type something here that is going to change your mind about how you feel and I don't think weight lifting is a bad thing, but don't get caught up in doing it because you view your body as unacceptable how it currently is. If that's how you view your body, that's likely how you'll always view it, no matter what mass gains you make.
I highly recommend pursuing CBT treatment if you feel it's getting in the way of you living the life you want to.
Good luck to you!