A good meal can comfort you and bring back pleasant memories. But are there any superfoods that are guaranteed to put a smile on your face?
In Proust's Remembrance of Things Past, the narrator depicts the "powerful joy" that a tea-soaked madeleine awakes in him when he is "dispirited after a dreary day, with the prospect of a depressing morrow". It isn't so much that the sweet cake tastes lovely, but that it transports him to his innocent youth, when his aunt in the country would feed him the very same on Sunday mornings. This is just one of the many ways in which food can make us happy.
Flavour is a powerful conductor of memories. Strawberries, for example, may evoke a very special summer, a traditional Sunday roast may draw a familiar, cosy blanket over a wet weekend, or birthday cake may conjure a childlike wonder. The "involuntary memory" effect (as Proust called it) can partly be explained by "plumbing", according to olfactory scientist Avery Gilbert. Smell is the single most influential sense in flavour appreciation, and unlike the other senses it is processed in an ancient part of the brain that deals with strong emotional responses and memory, the amygdala.
Of course, it helps if these foods are delicious. "Tasty food is one of the most universal routes to pleasure," reads a lofty academic paper by the Oxford psychiatrist Morten Kringelbach on our understanding, so far, of the neuroscience of happiness. Which is why eating forms the basis of much scientific experimentation into the mechanics behind that elusive warm, fuzzy sense of well-being. Pleasure is widely viewed as an essential component of happiness: food excites the reward system, stimulating dopamine to ignite desire and anticipation, and then when we eat, opiates and cannabinoids are released - basically, drugs made by our own brains.
However, such pleasures are fleeting, and if you rely on unhealthy foods to get high, you may mess up your reward system, encouraging uncontrollable cravings and binges. You may also feel guilty. "Our attitudes and beliefs about these foods", suspects psychologist Andrew Smith of Cardiff University, cause us to feel low after consuming them. Recent research by Smith involved giving some people crisps and chocolate for their teatime snack over the course of 10 days, while another group ate fruit. The results were that chocolate was associated with greater depression, those who ate chocolate and crisps reported greater cognitive difficulties and fatigue, whereas the fruit group had lower anxiety, depression and emotional distress.
Leaving aside questions of conscience, a balanced diet can also make you happier just by making you healthier. Fibre, for example, eases the systemic sluggishness that comes with constipation. Vitamin B12, which is found in meat, fish, cheese and eggs, helps maintain brain function in old age, and deficiencies in B12 and folate (which you get by eating your greens) have been linked with depression.
Avoiding deficiencies is one thing, but when it comes to isolating mood-enhancing foods, and the micronutrients within them, firm knowledge remains beyond our grasp. "Tryptophan in pumpkin seeds helps the brain make serotonin," which is the "happy hormone", claims an article on foxnews.com. And it is true that an amino acid called tryptophan (found in white meat, eggs, bananas, avocados and many other foods) is used by the brain to synthesise serotonin. But there is no evidence that eating more of these foods will make a blind bit of difference. All the other amino acids in them are better at crossing the blood-brain barrier, says Marijn Kroes of the Psychology Department and Centre for Neural Science at New York University. "If you eat an egg, most likely what happens is that all the other amino acids will end up in the brain, not actually causing an increase of tryptophan in the brain," Kroes says.
In a study published earlier this year, however, Kroes did show that if you remove the other competing amino acids from egg whites, brain function improves and mood is elevated. It's possible, he says, "that there are food products in the normal food cycle that have an amino-acid ratio that naturally allows tryptophan intake, but we don't know what these products are, or how this would work exactly". Meanwhile, you could merrily eat a tryptophan-rich diet and feel better simply by believing that the foods will improve your mental health. As Kroes says: "The placebo effect is one of the strongest effects in medicine."
Alongside pleasure, another contributor to happiness is a sense of meaningfulness. This is where cooking comes in. A couple of years ago, the Irish author Marian Keyes wrote a book entitled Saved by Cake after baking helped her survive a severe depression. She couldn't muster enough interest in life to haul herself out of bed most days, until (she wrote on her blog): "I started baking cakes, because I was so totally unable to do anything else and I found it comforting and it got me through the day."
This will come as little surprise to Mark Salter, a consultant psychiatrist in Hackney, London, because cooking is an established occupational therapy for depression. "The preparing, sharing and consuming of food is so precious," he says, "because it lies slap at the heart of what it means to be human - to love, to relate, to plan, to feed, to enjoy and to share."
While hobbies such as collecting stamps or flower arranging can help with memory and cognition, and provide a focus, cooking offers so much more. "It isn't only a pleasure," Salter says, "but a life skill. It's elemental, caring for yourself and others."
Combine this power with the tendency for home-cooked food to be healthier, and you have a nutritional and psychological jackpot. A 2011 study published in the American Journal of Clinical Nutrition found that not only is home-prepared food usually healthier; it is also followed by "more intense, positive emotions and less worry than those consumed away from home".
If you go one step further and grow some food, what with the established positive effects of being outside and working with nature, the satisfaction of growing stuff, and the deliciousness of freshly harvested produce, the happy-making potential of eating is off the scale.
A treat for the senses: street food in Dalston, east London. Photograph: Alex Sturrock for the Observer