Heya... I guess... we will all have triggers of some sort and often the way we deal with difficult situations is by relying on a mechanism which we have developed when we were very little.
If you watched 'My Big Fat Diet Show' - maybe you will recall a lady who absolutely adored cheese. Was it cheese? I'm not sure. But either way, her story was, that when she left India, she was forced to leave her Granny behind... as a way to deal with it, she remembered her mum giving her some food to deal with her anguish of missing the family member... ever since then, without her realising, the cheese became her source of comfort for all situations. Whenever she ate the substance it made her feel warm.
Same with the man addicted to Coke.... His mum gave it to him in a baby bottle for crying out loud!
The way to deal with it... If you don't want to turn to food in a difficult situation - at first, the technique to use is, get a glass of water ready. Have your trigger (denying the comfort food at first will ONLY MAKE THINGS WORSE MENTALLY) - but in between every mouthful have a big sip of water. It will start breaking that strict reliance on the pure hit from the trigger.
Have a go at that for a few weeks... Once that cycle is broken, maybe then, the rest will follow and you will be able to address your difficult situations in a more constructive manner... I gave up my vices too - and after a while I started seeing actual ways to build bridges rather than running away and ignoring the cracks in the mortar.
Wishing you courage and strength.
x Hang in there.