By Katherine Tallmadge for U.S. News Health

Halloween is all about sweets! So it's no surprise that Halloween can trip up even the most conscientious dieter. With Halloween and the end-of-year holidays looming, it's important to determine a strategy for dealing with the temptation of sweets: what to eat, what to bring into the home and what to serve others.

More from U.S. News Health:
Stop Emotional Eating With These 5 Tips
As Halloween Approaches, a Dietitian Asks: WWDKD?
How to Conquer Food Cravings

My philosophy is that all foods can be enjoyed in moderation. But there are special challenges posed by some foods, particularly sweets. Understanding the science behind sweet cravings and overeating can help us eat in a more moderate and healthy way:

People have an inborn attraction to sweets. We've been eating naturally sweet foods such as breast milk and fruit for hundreds of thousands of years, because they contain life-sustaining nutrients. A love for those foods helped keep us alive.

Brain chemistry holds an important clue. Research shows that sugary sweets, which are simple carbohydrates, act in a similar way as many antidepressants. They increase the brain chemical serotonin, which helps regulate mood and appetite. When we're stressed, anxious, or depressed, serotonin levels can drop; one way people modify their moods (consciously or not) is by eating carbs -- including in their purest form, sugar.

Halloween cravings may be uniquely influenced by seasonal changes. Studies show that as days get shorter, and we are exposed to less sunshine, serotonin activity may be affected. Since eating carbohydrates enhances serotonin synthesis, carbohydrate consumption may be a behavioral way to increase serotonin levels and improve our mood. Other researchers say that sweet cravings are mainly determined by culture or by psychological and behavioral factors, rather than by physiology. Chances are that a combination of factors is responsible.

Women are particularly vulnerable to sweet cravings. Women have less serotonin than men and may turn to sweets to boost the feel-good brain chemical. Some researchers attribute women's reportedly increased cravings for -- and consequent indulgences in -- sweets to the female hormone estrogen. It's been reported that sweet cravings change with a woman's menstrual cycle and with pregnancy -- circumstantial evidence that estrogen may play a role. But the findings are inconsistent, as some women report increased cravings during menstruation, while others report higher cravings as a pre-menstrual symptom, when estrogen levels may be low.

Upbringing also plays a role. Most studies report that exposure during childhood is the major determinant of what we crave and what we are susceptible to overeating. You might copy a parent's love for sweets and remember the fun of baking together. College students, for example, may combat loneliness by overindulging a love of sweets.

If it's nearby, it's hard to resist. Availability and proximity probably trump all of the other reasons why we crave and overeat sweets. When tasty foods are around, we simply eat more of them. That's why Halloween is such a trap. Halloween candy is novel; it only comes around once a year. It comes in small pieces, so you fool yourself into thinking you're not eating as much. You put it in bowls around the house and eat it mindlessly.

If you have a strong desire for sweets, it may be a sign that you're depressed, anxious or stressed. But the good news is that you don't have to indulge in sweets to raise your serotonin levels or to feel good. Exercising, stress management, and spending time with loved ones are activities that will also help reduce depression, anxiety and stress. It's also important to understand the core of your emotional problems and for that, you may need to seek help from a professional.

Using candy to feel better is not a great solution for your waistline. It's so calorie-dense that it doesn't take much to overeat. For the same calories in a candy bar, you could eat four apples. Or maybe you couldn't -- and that's the point.

Don't get me wrong, I'm not urging you to be a Halloween Scrooge. It's possible to have fun with Halloween, and even eat candy, but still avoid some of the excesses. Here's how:

  • Buy only what you need for trick-or-treaters, and buy your least favorite candy. Give away the remaining candy at the end of the evening so that there's nothing left.

  • If you want to lose or maintain weight, keep your candy, or other "extra" calories, to no more than 10 percent of your daily calories -- or 200 calories for the average 2,000-calorie intake. You may even get away with one big splurge on Halloween. But if you splurge for two or more days, it will probably negatively affect your waistline.

  • If you can't resist eating too much candy, wait to buy it on Halloween day -- or don't buy it. This way, the candy won't be around as a constant temptation.

  • Try fun and healthier alternatives to sweets. Serve up popcorn, roasted pumpkin seeds, sliced apples and fruit with nice dips.

  • Most importantly, if you do find you overeat, give yourself a break. Don't dwell on the negative, and get over it! Analyze objectively what you can do differently next time.

  • Eat plenty of healthy carbohydrates, such as fruits, vegetables, whole grains and legumes to keep serotonin at optimum levels and reduce cravings of less-healthy carbs like the refined sugar found in candy.

Happy Halloween!

Katherine Tallmadge, M.A., R.D., L.D., is the author of Diet Simple: 195 Mental Tricks, Substitutions, Habits & Inspirations, and President of Personalized Nutrition, where she custom-designs holistic nutrition and weight loss programs for individuals and companies. Katherine is passionate about helping people transform their health and their lives through counseling, writing, speaking engagements, and regular appearances in the national media.

Also on HuffPost:

Loading Slideshow...
  • Kit Kat

    The crispy treat has <a href="http://www.thehersheycompany.com/brands/kit-kat-wafer-bars/milk-chocolate.aspx">15 ingredients</a>, including <a href="http://www.palsgaard.com/products/confectionery/pgpr/">PGPR</a>, a cost-saving chocolate emulsifier often used <a href="http://www.danisco.com/product-range/emulsifiers/grindstedr-pgpr/">instead of cocoa butter</a>. <blockquote>Sugar, wheat flour, nonfat milk, cocoa butter, chocolate, palm kernel oil, lactose, milk fat, soy lecithin, PGPR, yeast, vanillin, artificial flavor, salt, sodium bicarbonate</blockquote>

  • Milky Way

    This chocolate sweet also has <a href="http://www.milkywaybar.com/facts_faq.shtml#question03">15 ingredients</a>: <blockquote>Sugar, cocoa butter, skim milk, chocolate, lactose, milk fat, soy lecithin, artificial flavor, corn syrup, hydrogenated palm kernel oil and/or palm oil, cocoa powder processed with alkali, malted barley, salt, egg whites</blockquote>

  • Nerds

    The majority of the <a href="http://www.wonka.com/home.aspx/products">17 ingredients in Wonka Nerds</a> are artificial colors and <a href="http://www.huffingtonpost.com/2012/09/13/other-names-for-sugar-maltose-dextrose_n_1874487.html">sugar by other names</a>. <blockquote>Dextrose, sugar, malic acid, corn syrup, artificial flavors, carnauba wax, carmine color, blue 1, blue 1 lake, blue 2, blue 2 lake, red 40, red 40 lake, yellow 5, yellow 5 lake, yellow 6, yellow 6 lake</blockquote>

  • Whoppers

    There are <a href="http://www.thehersheycompany.com/brands/whoppers/milk-chocolate-malted-milk-balls.aspx">17 ingredients in Whoppers</a>, including a couple that are especially tricky to pronounce -- a big red flag. <blockquote>Sugar, corn syrup, partially hydrogenated palm kernel oil, whey, barley malt, wheat flour, milk, salt, sodium bicarbonate, cocoa, resinous glaze, sorbitan tristearate, soy lecithin, natural and artificial flavor, calcium carbonate, tapioca dextrin</blockquote>

  • Skittles

    Don't let the "apple juice from concentrate" fool you into thinking that the <a href="http://www.wrigley.com/global/brands/skittles.aspx#panel-3">19 ingredients in Skittles</a> have some health value -- it's just a <a href="http://www.huffingtonpost.com/2012/09/13/other-names-for-sugar-maltose-dextrose_n_1874487.html">sneaky way to say "sugar."</a> <blockquote>Sugar, corn syrup, hydrogenated palm kernel oil, apple juice from concentrate, citric acid, dextrin, modified corn starch, natural and artificial flavors, yellow 6 lake, red 40 lake, yellow 5 lake, blue 2 lake, yellow 5, red 40, yellow 6, blue 1 lake, blue 1, ascorbic acid</blockquote>

  • Butterfinger

    Among the 19 ingredients we counted on a Butterfinger label is <a href="http://www.huffingtonpost.com/food-republic/6-ingredients-food_b_1400970.html">TBHQ, a form of butane</a>. Yes, as in lighter fluid. <blockquote>Corn syrup, sugar, ground roasted peanuts, hydrogenated palm kernel oil, cocoa, molasses, whey, confectioner's corn flakes, nonfat milk, salt, lactic acid esters, soy lecithin, soybean oil, cornstarch, artificial flavors, TBHQ, citric acid, yellow 5, red 40</blockquote>

  • Twizzlers

    They look harmless enough, but Twizzlers Strawberry Twists contain <a href="http://www.thehersheycompany.com/brands/twizzlers-twists/strawberry.aspx">20 ingredients</a>, including glycerin, which is also used in some soaps. <blockquote>Corn syrup, flour, niaicin, ferrous sulfate, thiamin mononitrate, riboflavin, folic acid, sugar, cornstarch, palm oil, salt, artificial flavor, mono- and diglycerides, citric acid, potassium sorbate, red 40, mineral oil, soy lecithin, glycerin</blockquote>