Hey brother!
I've dipped my toes into this forum and I've got my own struggles with loneliness and social anxiety and such, so I hear you loud and clear. This is where we all get a chance to air our dirty laundry!
I've been in and out of drinking and smoking and pornography and this and that over the years (I'm 28) but I've entered a pretty positive period recently, I'm feeling much more mentally stable - yet there are still many things that I'm trying to get a handle on, and I'm by no way content with my position. I've relapsed just today on some pornography and I lack much accountability. I struggle with a mild drinking problem, it always seems to throw me off-track! I'm close to starting Zac Small's 31 Days To Masculinity program and getting my momentum back. It's all a work-in-progress, until the end I suppose!
I'd say if you have someone as the object of your desire, then count yourself lucky! I'm not in that position (though I'm convinced there was this girl earlier in the week I passed in the shops, we had some chemistry man... and the girl yesterday in the Zen shop...), so I've got to work harder to find the one for me.
There are so many maxims and phrases to help you through this, but the absolute cornerstone I believe is starting with
yourself, because out of that blossoms your life, your choices, and your reflection to others, which then reinforces who you are. Whether it be self-image, your thought patterns, your habits, your routine, addictions, diet, exercise, work, family, relationships; it could be any or, more than likely, a subtle combination of these, but I'd start digging deeper than you've ever done before to bring light to your struggles. Pull out the roots and the weeds won't ever get a chance to grow back (easier said than done, right!)
I've found that quieting my mind through meditation can be helpful, but be careful in which form you do it and where you're at on your journey. It's a powerful tool but it can go awry if misdirected or done incorrectly (as I've learned myself recently). Starting out with some simple breathing techniques (through the nose), posture correction and finding a quiet space can be really beneficial if everything is spinning around for you.
At the very least, this being my no.1 favourite quote, heed this advice from the Buddha:
"A Man may conquer a million men in battle but one who conquers Himself is, indeed, the greatest of conquerors."
Seek silence.