Everyone who is trying to quit a habit needs a huge increase in contentment. Consider praying:
“Father, take away this spirit of drinking/drugs and help me to be content.”
If you are single it is wise to learn contentment with being single. I see divorced people who think and talk about finding someone all the time. Instead, it is wiser to think, pray, and talk often about being content. Then to think all the time about doing God’s will. Paul was in the top 1% of people who had great joy. He was single.
Second, whether you are single or married, put in the prayer and the work so that God becomes the answer to loneliness and other problems. He is the answer.
Third, I recommend dozens of prayers. Consider spending time each week to study exactly what you should be praying more about. No one should be trying to find the greatest variety of prayers and prayer topics. If you have zero contentment with your life, consider praying the above prayer 5-10 times per day, or more.
Fourth, if you have never married, now is the time to learn contentment so that you can do God’s will. If you learn contentment, form habits of going to war with sin, and learn to do God’s will… if you do get married later, it might be one of those rare, great marriages.
Finally, do you need to pray daily about contentment? I do. Today I am committing to working more on it. I am always happier when I am content.