We're all human, and having 'weaknesses' when it comes to food and drink is normal, so when you have the odd blip in your normally healthy schedule don't let it bother you too much - it's totally natural. Instead, think about about why you did it, what spurred you to break your good routine and look at getting back on the straight and narrow again. It's all about learning and not about berrating ourselves.
So, I tend to have 'blips' and the odd bad habit. Yes, I know I'm a personal trainer and should be a paragon of virtue, but I do love a cake (or a biscuit, or chocolate....) every now and again. I never used to be bothered, but maternity leave led to many tea and cake get togethers with other mums, and so my sweet tooth took hold. What this is, is a 'habit' - I don't need it, or necessarily crave it, but if it's there I have to have it. In my case it's definitely all in the mind. To see if I could break this cycle, I decided to do a no-sugar break. Three days of no sugar whatsoever - no fruit, milk, bread and other carbs. Yes they may be natural sugars, but your body processes them in the same way it does refined/added sugars. I thought that if I allowed myself natural sugars, that to compensate the 'bad' sugars, I'd end up eating loads of bananas or grapes! Which is not really the point of my exercise.
As it turns out, it's incredibly hard to cut out sugars completely , but I did manage to survive on meats, nuts and veggies. What I did find was that instead of consuming the 2000 calories I needed a day, I was only getting about 1200 - certainly not enough energy for me to get through my classes, so this was extremely tough. I also found that I still compensated for the carb/ stodge element, and ended up consuming more fats and salt than I would normally (through nuts, cheese, avocado etc). Just living off meat and veg (a lot of which have sugars) just isn't viable - you just don't get enough energy! You also miss out on the great vitamins and minerals from fruit.
So, as a summary, I wouldn't recommend trying this (well not for more than a few days anyway), but it did help me with my cake-eating, as it did get me out of the mindset of needing sweet things after savoury. It's a great way of making you more aware of what you're eating and breaking those habits. It was certainly eye-opening in terms of seeing what products have sugar in, even those you think are super healthy! My advice - log your food intake on something like myfitnesspal.com and see what you're actually consuming nutrient-wise.