This article will understand exactly why diets cannot work in the long run, why their thinking is the real cause of your weight gain and why creating the right beliefs is the only way achieve weight loss. How to gain weight? Habits (e.g., overeating) are visible because of the results (e.g., weight gain).
Habits are behaviors that have been made so often that it gets to be performed without thinking / without active attention. All behaviors have an internal cause: innate drives (e.g. hunger, thirst) or emotions (love, fear, anger, emotional stress) Emotions are often the result of beliefs. Beliefs are thoughts accepted as true the facts (for example, eating is my only way of coping with loneliness / sadness) http://rarefishingbooks.co.uk/author/niovimarie/
They carry our behavior automatically - are the autopilot of our brain, which are subconscious. Beliefs are determined by external stimuli, experiences, events and situations we encounter (e.g. constantly neglected and feels better when you eat). In other words, situations lead to thoughts and beliefs, thoughts and beliefs lead to feelings and emotions, feelings and emotions lead to behaviors, behaviors lead to habits and habits lead to visible results.
In your case: certain situations, it is taken to form disabling beliefs. These beliefs led him to feel discredits negative emotions. Negative emotions led you to make unhealthy behaviors. Eventually, through a repeated sequence of the situation-behavior, their behavior became unhealthy habits. As a result of their habits acquired undesirable results.