Well I didn't get the headache from knowing I hadn't eaten any chocolate; it was the opposite, I had the headache and then remembered and ate some chocolate, and the headache went away (though I suppose that part could be psychosomatic).

I only eat the recommended amount of dark chocolate most days, a block about 10cm x 3cm x 1cm. I don't really like the taste, though some flavored dark chocolates make it tasty. I definitely get an energy boost from eating it, so is that from caffeine or sugar?