Basically i work as a software developer for more than 4 years, also hitting the gym for more than 6 years(1.5 ~ 2.0 hours/5days week), i've been testing alot of things (from steroids, to drugs, nootropics, substances, etc. i'll encourage you not to do any of these) just to see how my mind & body react, the things that helped me control myself and avoid falling again for this, was:
Avoiding coffe and anything that contains it: As a developer i always wanted coffe around me, and i always fail, i couldn't go more than 3 days without not touching myself, after some time i noticed that after 1 cane of coffe i start getting hard strokes, and i decied to quit it for 1 week to see how my body reacts, i was right ofc, coffe was making me horny asf. after some time i had a talk with one of my co worker friend that is a Indian and he purpose me to swap coffe with some type of teas that changed my life basically, i was no longer the dead, depressed, anxious zombie without any joy of life (see below).
Detoxifiant Teas: I got a huge self control after just 2 days of drinking alot of natural herbs mixed without sugar, just pure tea, i basically replaced my water/coffe with tea (gym/study/work) always tea.
Alimentation: Food have a huge impact on your day to day living, if you can manage to hit your macronutrients(Proteins, Fats, Carbohydrates) & micronutrients(vitamins, minerals etc) you will feel much happyer/greater than before.
Supplements: Vitamin D, Zinc, Calcium, Vitamin C, Magnesium, Fish Oil(Omega Complex), AAKG(Arginie), BCAA(4:1:1/2:1:1), Proteins from herbs
Cold showers + Running: A 30 minutes run can change your mood and feel much better about yourself, i usually do thins in the morning combined with a cold shower and some meditaton.
Hope you can catch some information and apply to your day to day living.