Hi there ~
It seems like you have anxiety
around an eating disorder
which is making you have dizzy spells when you feel the urge to have something sweet. You should however expose yourself to this kind of food and then ask yourself if you can tolerate more of it. It is called graduate exposure therapy. One other way to deal with it is to have the food and resist the urge to throw up. I hope this helps.
Take care and have a lovely day !