Avoid reaching for a hamburger and fries when stress hits. Although it's natural to crave junk food when experiencing stress, researchers have now found that instead of providing comfort, it can harm mental health by increasing anxiety.

Earlier studies have shown that switching from a high-fat, high-sugar, ultra-processed diet to a healthier eating pattern can reduce the risk of depression and anxiety in general.

In a recent study published in the journal Biological Research, researchers investigated the underlying factors behind the connection between a high-fat diet and anxiety. They discovered that a high-fat diet disrupts the gut bacteria in animals, leading to behavioral changes and influencing brain chemicals through a complex gut-brain connection. This disruption ultimately contributes to increased anxiety.

In a prior study conducted by the same researchers, it was found that after being fed a diet high in saturated fats, rats showed heightened levels of neuroinflammation and behaviors indicative of anxiety.

"Everyone knows that these are not healthy foods, but we tend to think about them strictly in terms of a little weight gain. If you understand that they also impact your brain in a way that can promote anxiety, that makes the stakes even higher," lead author Christopher Lowry said in a news release.

During the nine-week trial, the rats were divided into two groups. One group was given a standard diet containing approximately 11% fat, while the other group received a high-fat diet with 45% fat, primarily composed of saturated fats from animal products.

According to the Centers for Disease Control and Prevention, a typical American diet consists of 36% fat.

Throughout the trial, the researchers collected fecal samples and examined the gut bacteria of the rats. At the end of the trial, the team conducted behavioral tests on the animals.

As expected, the rats on a high-fat diet gained more weight compared to those on the standard diet. The researchers noted that there was less diversity of gut bacteria in them, indicating poorer health. There was also an increase in a type of bacteria called Firmicutes and a decrease in a type called Bacteroidetes. A higher ratio of Firmicutes to Bacteroidetes is linked to the typical industrialized diet and obesity.

"The high-fat diet group also showed higher expression of three genes (tph2, htr1a, and slc6a4) involved in the production and signaling of the neurotransmitter serotonin—particularly in a region of the brainstem known as the dorsal raphe nucleus cDRD, which is associated with stress and anxiety," the news release stated.

Although serotonin is often called a "feel-good brain chemical," certain subsets of serotonin neurons, which, when activated, prompt anxiety-like responses in animals, Lowry explained.

"To think that just a high-fat diet could alter the expression of these genes in the brain is extraordinary. The high-fat group essentially had the molecular signature of a high anxiety state in their brain," Lowry added.