You need to have a repertoire of coping skills. Coping ability, like the emotions that trigger the eating, is an internal factor.
You can acquire new skills to cope with emotions like frustration, anger, lonliness, hopelessness, hurt, despair. These intense negative emotional states tend to lead you to food. The feelings need to be dealt with and eating is what you have learned to do to deal. Perhaps, rather than express your anger, or your hurt, or your desperation, you turn to food instead.
In this case, feeling negative emotions puts you at high risk for eating in a way that is probably not good for you. So, how do you cope? Why not identify the emotion or emotions you are having. That seems sensible, doesn' t it?
It requires something simple - a time out.
Ask yourself: what am I feeling?
Then: why am I feeling this way now?
This is a wonderful start to coping.
Next, you can begin to think about what you might do to help with the feeling or feelings - what you can do that would be much more effective for dealing with your emotions than eating is.
For example, if the emotions come up in relation to an interpersonal situation, might you express the feelings more directly? Can you call on a friend if you' re feeling lonely? Can you ask for help if you' re feeling overwhelmed? If someone has hurt you, can you talk to him/her about it?
Maybe these seem like very elementary things to you, and they are - but they are also effective coping mechanisms. If you learn how to do them - get skilled at it - then you will be able to tame your emotional eating, no doubt about it.