If an addiction is causing problems in your life, know that God loves you and offers freedom and hope for a better future. If you will admit you need help, God will help you. Your next step is to confess to God and another person that you have a problem. Ask Him to forgive you and fill you with hope.
All addiction is slavery. Although indulging in the moment may feel like freedom, that is not true freedom (John 8:34, Matthew 6:24). God has something so much better for you.
Walking in consistent freedom cannot be done alone and will take time. You are going to need help. You need people that can hold you accountable and be there for you. There are many people who have been where you are and have found new life and freedom from addiction. Specifically regarding substance abuse, some people start with a detoxification program for the first days as a safe way to overcome withdrawals. Others have worked through addiction recovery programs at in-patient or outpatient treatment centers to help get them and keep them
on the right path.
Remember: you are not meant to do this alone! Jesus promises in Philippians 1:6 that He will begin the process in you and carry it out in His power.
Get Christ in you and others around you.