As Halloween approaches and candy sits piled high on store shelves, your sweet tooth may be aching for a Kit-Kat.  You might want to avoid that temptation, however, to consider some of the health issues lurking under all that sweetness.

Higher intake of sugar is associated with an increased risk of weight gain, diabetes, hypertension, and death related to heart problems.  If 25 percent or more of your daily calories come from sweets, one large-scale study estimated that you are nearly three times more likely to die of cardiovascular disease than someone whose sugar intake makes up only 10 percent of their daily total calories. Furthermore, the 2015-2020 Dietary Guidelines for Americans recommends less than 10 percent of daily calories from added sugars as part of a healthy diet.

Despite the guidelines and health risks, most adults consume more sugar than recommended.  There are a number of possible reasons for that.

In animal studies, researchers have found that sugar releases the brain's natural pleasure-producing chemicals such as dopamine, which would give it an addictive quality.  Overconsumption of sweets can also override the body's ability to regulate appetite.  Additionally, it's hard to avoid added sugar in our current food environments, as many foods are engineered to contain high levels of it.

Mood is a part of the picture as well.  In one large study, participants who reported consuming the greatest amount of surgery foods and beverages were 23 percent more likely to experience poorer psychological health.  This effect was independent of other factors that could lead to problems like depression and anxiety.  Based on current evidence, diets high in both fat and sugar seem to be most problematic, and particularly associated with depressed mood.

Once we establish high sugar diets, it may be difficult to stop, especially if we lead highly stressful lives.  Research in animals has found that removing sugar from your diet is connected to depression and anxiety-like behavior.  This is likely caused by a sharp drop in dopamine.  Thus, eating high-sugar foods may be a way we self-medicate when feeling overwhelmed.

Although eating foods primarily containing sugar is not always tied to "food addiction" or increased weight gain, we need to pay attention to our lifestyle as a whole.  There are a number of ways to tackle stress, depression, and sugar cravings all at once. Here are a few tactics:

Exercise.   Cardio-based exercises and strength training have shown promise in helping some people resist unhealthy food cravings.  For those with a sedentary job, a five-minute walk of moderate intensity each hour can help decrease fatigue and the tug of the candy jar.

Yoga.  The combination of gentle stretching, mindfulness, and a supportive community may be enough to overcome temptation.  In one recent study, yoga increased participants' motivation to eat in healthy ways and promoted a desire for more healthy foods.

Mindfulness.  Mindful eating practices involve paying attention to physical hunger, stomach fullness, and taste.  Savoring a small amount of sweets can lead to a reduced desire to eat larger quantities.

Use imagery and "watch" your thinking.   Immersing your mind in another place can interrupt the craving process.  When asked to vividly imagine walking through a forest with all its sights, sounds, and smells, chocolate-cravers reported fewer and less intense chocolate-related thoughts.  "Watching your thoughts" as if standing on a balcony can have the same effect.

None of this is to say you can't enjoy a piece or two of candy.  In fact, restraining yourself too much may lead to exactly what you are trying to avoid: a sweets binge.  As the Greek poet Hesiod wrote, "moderation is best in all things."

Scott Glassman, Psy.D., directs "A Happier You," a positive psychology group program at Philadelphia College of Osteopathic Medicine.