You should not be eating or drinking caffine. It dehyydrates you more. Bulk up on water and understand you'll have caffine withdrawls for a few days. Stick it out. Get some extra virgin olive oil, maybe a tablespoon or so, and some pure pepppermint oil extract. Add 3-5 drops of the peppermint oil to the olive oil and rub on your temples, forehead, bridge of your nose, neck, shoulders and base of your skull. You know, all those places where you feel pain and pressure when a heachace hits. It's important that you use it only on your head/neck area. Peppermint can cause uterine contractions but only if you rub it across your stomach.
The idea is, just keep it as far away from the uterus as possible and you'll be just fine.