Juts off the top of my head, has your doctor checked for hypoglycemia? The headache and the relation to sugar intake makes me think it is a possibility.