Can you repeat what the problem is because you may have hit the wrong key or spell check may have changed some words on you. Re-read your post back and see if you can clarify. The only thing that is clear is where you said "I have been taking painkillers for 4 years and want to stop" Well, you are in the right place.
Yes, you are in the right place. It helps to know how many for how long. You said four years, but how many were you using a day? There are two ways you can go about getting off of them, but it depends on your circumstances. You could quit cold turkey. With pain pills, it is usually safe to quit CT. It will be uncomfortable, and you will feel sick, but it is totally doable. Most everyone here has quit CT at some point, and you can, too.
There is something called the Thomas Recipe. Google it or look it up here. I am not able to quote it exactly. It really helps you through those initial detox days and through the yucky sadness you might feel for a bit afterwards. I know it contains 5HTP which helps with your mood. It really is quite awesome.
You could also taper. If a doctor was giving you the medications, you could ask your doctor for a taper sheet. I have never tapered before, but I understand it to be the easier choice in some ways. However, if you are like many on here, you might want to just rip the band aid off and get it over with. That is ok, too. Either way, you would be getting clean, and that is all that matters.
I have gone through two different kinds of detoxes. I detoxed from opiates, and I detoxed from benzos. I want to tell you this to make you feel better: Sure, opiate withdrawal is tough,but it is very, very doable. There is no need to be scared. We will help you through it. Quitting Ambien was really rough for me. That is scary because there is a risk of seizure going cold turkey. But what you are dealing with can be done safely at home, so that's good.