I'd like to point out 1 Timothy 5:23: "Stop drinking only water, and use a little wine because of your stomach and your frequent illnesses."
That's a verse where Paul, the person generally believed to be the book's writer, is telling Timothy, a young pastor, to change his diet a little to alleviate sickness. In essence, he's telling Timothy to take "medicine," in the form of wine.
Let's also keep in mind that Luke, writer of the Gospel of Luke and Acts, was also Paul's personal physician.
God has no problem with us using medicine or going to the doctor. So maybe going to the doctor or taking a pill for the headache creates one less opportunity for God to perform a miracle. That's hardly lack of faith.