From a former addict,
It's hard to feel connected to God, let alone anything, when you've got all that "medicine" floating around in your body and clouding your mind and judgement. I, too, became addicted to prescription pain pills in the same fashion. I've been there, I understand, I am also sober now for almost 5 years.
First thing first, Recognize that you are addicted. You've asked for help, those are the first steps.
You need to seek help with the detox process. Of course, you could do this at home, but it can be painful, stressful, and it's better (in my opinion) to do this a place specialized for this, a detox center.
Then, everyday, minute by minute, you have to decide to stay away from them. Find a support group. Get your friends and family involved, anyone who is not helping or is holding you back, needs to be gone for a while. Pray, Pray, Pray.
I will be praying for you. I know how stressful and uncomfortable a process this can be. I've done it. Twice. But friend, YOU CAN DO THIS, if you really want it.