I am glad you asked the question because I never thought about this before.
I am sorry you are gaining weight. Have you considered changing the type of foods you are eating. Carbohydrates tend to encourage binge eating because they spike the blood sugar level and when it crashes the urge to eat more is felt because of low blood sugar levels. Alcohol has a similar although more pronounced affect.
Here are articles discussing eating and overeating.
Psych Central - Search results for Difference between comfort eating and an actual disorder