First, we should distinguish between painkillers, which are very powerful medications that function by blocking pain receptors in the brain, and your more basic over-the-counter analgesics, which work by alleviating inflammation. A headache is a kind of this inflammation; when you experience that pain, it’s pain at the level of the muscles or bones, since there are no nerve endings in the brain.
It is perfectly fine to use medicine for the alleviation of pain, whatever mechanism of action the medicine may be, or whatever strength it might be. While it is a good and holy thing to offer up our pain and suffering as a prayer to God, we don’t have to forego treating a medical problem, even a mild one. I take ibuprofen on occasion for pain in my head and shoulders.
Now if you’re taking painkillers for headaches, you either have some mightily powerful headaches, or you’re using a disproportionate means of treatment. But that would be the only real way I can think of that taking pain medication would be wrong–it’s being done either disproportionate to the medical issue, or else is being outright abused.
-Fr ACEGC