Have you altered your diet in any way (cut out spicy, fatty, fried, citrus & dairy foods) and if so, with what results? Do you elevate the head of your bed at night to a forty-five degree angle and refrain from eating two to three hours prior to lying down? Do you avoid NSAIDs and aspirin? Do you eat frequent small meals instead of eating large/heavy meals?
As you likely know GERD (gastro-esophageal reflux disease) and headache can often be associated with one another. Are you experiencing a lot of stress and anxiety? If so, this can be a trigger of both increased acid production and headache. Also, if you have allergies, symptoms of GERD can be aggravated, so you may want to go to an allergist.
Burning in the stomach can be so frustrating. I have GERD myself and take a high dose prescription of ranitidine (prescribed by my doctor). Often times, they will want to prescribe something that works on inhibiting acid better than the medication I take, but I have had trouble finding something else that works for me. But this might not be the case for you, so ask your doctor if you should try something like omeprazole or Nexium if you haven't already tried those medication.
I am thinking it could be acid reflux/GERD which can be very painful, your doctor may be able to prescribe or OTc meds help something like Prevacid,