If I were taking a medicine for pain that was causing more pain...I'd stop the medication.
If I get a headache that's bad enough for me to want to mess with it, I turn to homeopathics. I have two books that list many remedies and the symptoms that indicate the need for each, then I hope I have that remedy on hand!
I had a nasty nasty nasty headache for a few days last week (hubby, who had migraines from childhood until he got under regular chiropractic care, wanted to label it a migraine), and I used a homeopathic remedy to get it under the "cut off my head to stop it" feeling, so I could deal with it. Took a few days to get through it (and the good news is that coffee tasted horrid to me during the headache, so I switched over to tea during the headache, which is what I wanted to do anyway. Lowering the caffeine would have given me a headache, so I figured I'd just do both at the same time, LOL). I like homeopathics.