I had started eating a bran muffin and a latte for breakfast- not happy for my blood sugar- but I was doing it. Then- whammo- craving sugar! And- here is exactly the way to pull out of a sugar craving:
First- forgive yourself. The guilt does not help- it makes you more likely to slip again.
Eat some protein and drink some water. Barry Sears M.D. also talks about this. You can normalize your blood sugars pretty quickly if you stop doing the things that are jacking them. Coffee/caffeine elevates blood sugar and makes you more tired in the long run, producing a vicious cycle. Drink lots of water to get hydrated. Eat protein and fiber rich green vegetables.
And, change the trigger. If you are eating at a particular time or place, so that you can identify particular habits you want to change- you need to scramble the signal. Go exercise before that class you can't stand. Exhausted after working the late shift? Jump in a hot shower and relax in bed with some new tunes instead of going to the refridgerator. It's not just being nice to yourself- it's about switching the channel on a habit.