I was addicted to drugs when I was young and it was hard to stop, how do you think to get rid of drugs?
Maybe focus on something else, like a sport or playing a game. I read there's a company that is developing the use of virtual reality to help treat those who are suffering from drug addiction and alcohol problems. Maybe you can use your VR headset (if you have one) to escape and keep yourself from gambling and taking drugs.