If you have fallen into the same trap I have, where you feel like you need junk food in stressful times, then you should find alternate means of stress relief. You should find ways to regularly cope with stress in the moment, as well as trying to pre-emptively reduce your stress.
In-the-moment coping strategies are many and varied, but can include deep breathing exercises, finding a substitute consumable (sparkling water instead of soda, stick of gum instead of a cookie, maybe even a protein bar instead of a candy bar), and going for a quick walk.
Great pre-emptive coping strategies include regular exercise, writing in a journal, and meditation. If you can do one (or all!) of these things every day, you may be able to lessen the strength of your stresses and issues, to the point where you crave junk food less.
In any case, try to understand why you are feeling bad, stressed, or emotional; work on that problem. Don't exacerbate it by binging on ice cream.