We all turn to "comfort food" when our bodies or minds are stressed and often this comfort food we crave is carbohydrates or the infamous sugar, but that doesn't mean we can't give our bodies what it's asking for.
We all know that sugar (glucose) is fuel for our brains and I've mentioned many times the importance of complex carbohydrates; they may be the most important nutrient our body can get, but the biggest problem with most people is that they misinterpret these cravings for unhealthy nutrient lacking empty calorie processed foods high in refined carbohydrates and simple sugars.
Complex carbohydrates (fresh vegetables, natural whole grains, and legumes) contain an abundance of nutrients most of which is lost during processing, so all you are really getting with that bread or bagel, plate of pasta, or precooked processed grains is empty calories and an unwanted spike in blood sugar.
And the same goes with that candy bar or sugary snack you call "brain food"... unlike complex sugars simple sugars (refined white sugar, high fructose corn syrup, etc.) is that the same processing that rendered the carbohydrates useless has removed any nutrients from the sugar, so all you're left with is, well, sugar.
So give your body what it wants, not what generations of misleading and misinforming information have lead us to believe.