Attachments between foods and emotions are very varied and unique to you and are all reversible, however, you must know that you may also have physiological or physical body attachment to some foods.
For example, certain foods cause the release of serotonin in our brains, which is a hormone responsible for the 'happy' feelings, they are mostly refined sugars like those found on ice cream, chocolates and candy and refined flours, refined carbs, like those found in donuts, bread, cookies and chips.
After a cycle of anything that we give our bodies, it 'learns', adapts and adjusts to that pattern, so if for a certain period of time you have been feeling a certain feeling and you go for the comfort foods and experience a happy feeling, even thought it may be temporary, your body now expects the same every time that the feeling kicks in.
This creates a sort of dependancy and an impulse to keep repeating the same pattern.
However, you must know that your body is an unbelievable piece of machinery, it adapts to almost anything, so right now it has adapted and adjusted to what you may consider a bad pattern, but if you give it some time, normally a few days or a couple of weeks, it will start adapting and adjusting to any new pattern, say a healthy one, and instead of fighting you, it will help you by asking more of the new.
Yes, you feel this way now, given what you eat, your body responds in different ways, however, all it needs is a dose of nutrients every day to be ok and a certain level of calories to keep all your organs running.
Healthy nutrition is defined as giving your body the amounts of macronutrients that it needs every day, it needs, proteins, carbs and fat, but only in healthy ways and you should provide them to your body coming from all groups of foods.
When you try a healthy diet your body starts detoxing itself from all the bad stuff it has, it starts absorbing the right nutrients every day and the way it will make you feel will be tremendous, wonderful, helping you by not sending signals of cravings and asking you for more of the new healthy stuff.
Try a fullness healthy diet like a mediterranean one for a couple weeks and check the signs.