I read "Self Reliance" by Ralph Waldo Emerson, "The New Psycho-Cybernetics" by Maxwell Maltz, and "The Power of Habit" by Charles Duhigg. These three are at the front of my mind. Especially Emerson. "Self-Reliance" was pivotal.
I listened to "The Power of Now" audiobook by Eckhart Tolle. This coupled with The New Psycho-Cybernetics helped me understand "where" my thoughts were coming from and how to handle them. I was in a lot of pain from sports injuries, and Eckhart Tolle's concept of the "Pain-body" manifesting itself in my thoughts and actions helped me kill self-destructive behavior at the source. A decade+ later, I would also recommend C.S. Lewis' "The Screwtape Letters" because I rather enjoy the idea that "demons" are competing for my energy, and I am beating them.
I watched plenty of YouTube content from positive male role-models, such as Elliott Hulse (his content has radically changed in the last decade, but in the early days it was very wholesome).
I worked on my body.
I stopped doing drugs.
I took care of my diet/nutrition.
I improved my appearance (more consistent grooming, better-fitting clothes... nothing radical).
I finished my undergraduate degree.
I decided that I had a duty towards something greater than myself. Even if it felt like the "message" coming from society at large was "aimed" at me, I determined that it would be better to work on myself and hone my skills in order to be a positive force in the world and role-model to those around me.
I sacrificed time that I would have otherwise spent consuming media and replaced it with more constructive endeavors (learning basic software engineering skills). This helped me find gainful employment to pay my bills, and give me health insurance.
My parents were supportive in some ways, and clueless or lazy in others.
My friends were very supportive. One of them grabbed me by the scruff of the neck and shook some sense into me. Literally. He said he was done with my excuses. This made a massive impact.
My girlfriend(s) were not supportive. I knew I needed to improve myself, and that was probably unattractive. I can't blame them.
The most important person in the equation was myself. I learned to stop letting other people control my emotions or affect my mindset.
tl:dr; Grab a copy of Self-Reliance by Ralph Waldo Emerson and READ IT. Let it sink in. Then put it into practice.