She sounds like she is mighty full of herself this one.
To give a nonsense ultimatum like that she must think she has you under her thumb. If you let her do this, if you let her control you with something ridiculous she WILL lose respect for you. Stand up to her and be a man. Women do not respect guys that her walk all over them. Be loving but be assertive. What is she going to tell her friends "We broke up because he ate sugar" LOL.
Give her the breakup but do it maturely, tell her that you disagree with it and that you think you're great together. Then do not contact her at all. She will expect you to be chasing her, she will think she can just shoot an e-mail or text and have you back. After 1-2 weeks she will begin to lose that power wondering why you aren't reaching out, what are you doing, who are you doing it with. Let her miss you and feel a sense of loss when she realises what a stupid ultimatum it was. She will feel like the one who was broken up with and see she made a huge mistake.
If she contacts you, always reply but you want to be reserved, and you should be knowing this person gave you away over something so ridiculous. But it's okay to love someone who made a mistake and couldn't see your worth until you were gone.
Use this as an opportunity to break up with her and let her know what life is like without you, if you two had a great relationship then bet on it. I'd rather be with someone who knew they loved me too much to stay away as they will most likely not do it again in future when things get difficult. It sucks she has to learn this way but better than being with someone who thinks relationships are always smooth sailing.
You deserve to be loved and respected no matter how much sugar you eat. Also tell her the immune system runs off sugar. Every cell in the body runs off sugar. Sugar is a nutrient.