Emotional eating comes in two forms:-
food with a particular emotion e.g. depression, lonliness, joy, pleasure etc. For example, you might find solace by eating chocolate (which contains "feel good" hormones similar to those when you fall madly in love).
yourself from some emotional experience (which you may not even remember) e.g. by being fat, you repel unwanted attention - perhaps from a sexual abuser or playground bullies . It might also be that, if you are a shy person, by being fat you avoid being asked to be the centre of attention e.g. in the school play.
You might also be testing or defiant - "if they love me when I'm fat, I will know they REALLY love me". Or maybe, "I know "they" say this is a "bad" food, but I will have it anyway - nobody is going to tell me what to do".
Food is hugely important in our lives - it is necessary for survival, but it has lots of other social, cultural, status, and economic/power implications. Disconnecting it from these until it simply becomes nutrition and an occasional pleasure is a hard balancing act to get right. At nearly 62, I am definitely still struggling... and dealing with newly remembered stuff from my childhood
We all develop emotional habits and survival techniques from an early age. Sometimes it is necessary to examine the past to unlearn redundant or damaging responses. If you find a therapist you feel comfortable with, counselling or hypno-therapy may assist. Listening to a tape of positive affirmations and suggestions e.g. Jon Gabriel's cd played over and over while you sleep may help (it has helped me and I am not struggling with emotional eating so much).