The headaches are withdrawal symptoms from sugar. Like any drug, you can’t just quit cold turkey. I used to drink 5 cokes per day. That is 120 packs of sugar from a restaurant. I quit and eliminated all cakes, cookies and ice cream from my house and had the same headaches.
So, I started using limitation tricks that actually worked. I started with 4 packs of sugar in my tea. Now, after 20 years, I don’t use any. My big hang up was warm chocolate chip cookies. I found frozen ones that were very good. So, I would bake one cookie and eat it. If I wanted a second one, I had to wait another 15 minutes while it baked!
The same technique works for a lot of things. With a craving, eat one and wait 15 minutes for the next one. While preparing lunch, you could prepare one snack bag for the between meal snack. You will need it for awhile. Whatever tricks work.
Imagine if you were diabetic and had to eat a precise number of carbs, no snacks unless it was a medical emergency based on a blood test. One meal of 3 carbs is one slice of bread, one cup of yogurt and 6 oz of strawberries. Meat, fish, butter and non-starch vegetables can be eaten in any quantity. One half cup of cooked rice would substitute for one of those things.
Then you have to worry about fast and slow carbs. Your headaches are cured by fast carbs, but even fast carbs take 15 to 30 minutes to act. Restaurants are the worst. We always split meals.