Bouncing between overeating and dieting (which usually means under eating) is very common and ultimately frustrating.
The way to nip it in the bud? Cut out the under eating and restrictive eating.
Yo-yoing between "perfect" eating and going overboard with forbidden foods is so common in fact, that studies have proven their relationship.
There is something called the cognitive behavioral theory of eating disorders. To summarize, this theory suggests that binge eating is is due to attempts to restrict eating. It is important to note that this attempt at restricting eating may or may not be accompanied by actual undereating. You can see where dieting fits into the "schema" of eating disorders using this graphic:
There are many other studies that have also found a connection between dieting and overeating.
One study states that trying to control what you eat (in other words, dieting or trying to restrict what you eat as a way to regulate your weight) increases your vulnerability to uncontrolled eating when you are not able to follow all the restrictions you set for yourself. (due to the age of this study, I could not find an adequate online link: Herman CP, Polivy J. Restrained eating. In: Stunkard AJ, editor. Obesity. London: WB Saunders Company; 1980. p. 209. However, another, more recent one can be found here).
Another study suggests that having rigid food rules and dieting are associated with elevated eating pathology (this can mean binge eating or other disordered eating). It also states that rigid food rules do not contribute substantially to decreased weight. It found that restrained eating was associated with increased concern for eating and weight as well as body image disturbances.
One way to avoid eating too restrictively is to plan to eat a treat once in a while. This plans gives you something to look forward to- which can motivate you to eat better on a regular basis AND help you avoid feeling deprived.
One important key to this planned treat is to think of it as a TREAT NOT A CHEAT.
Eating your treat with attention and with intention helps your mind and body get satisfaction from the experience. Eating this treat while standing at the kitchen counter or while watching tv does not allow the brain to fully experience the taste and pleasure.
Most people plan to eat healthy- to eat more veggies, less meat, eat more homemade food, etc. Having a plan helps us stay on track with our goals for eating well. One thing we often forget to do is plan to eat treats. Most people try to avoid them as much as possible however doing this can backfire. This is because everyone eventually eats something delish so never allowing yourself enjoy a treat can lead to thinking you've ruined everything (The "what the heck!" effect).
So next time you find yourself overeating your favourite food, you may want to consider planning to eat a small portion of it more often!