One minute you’re crushing your holiday shopping list and the next you’re ugly crying in the car because your ex’s favorite song came on the radio. Or perhaps you find yourself alone baking Christmas cookies — the ones your mom used to make when you were little. If the holidays have a way of turning you into an emotional wreck, know there’s science behind these intense feelings.

“What happens with any kind of anniversary or moment where your relationship with a loved one was so important is that when that time comes around, memories come up,” psychologist Dr. Luana Marques explained to Mass General Brigham.

These memories are particularly powerful during the holidays because our senses are bombarded with emotional triggers — from familiar songs to family recipes — while social media feeds and holiday movies overflow with picture-perfect togetherness.

“We truly see what’s going on in our personal lives under the pressure of the party season and that can mean acknowledging loneliness, bringing forth and connecting consciously with any feelings of grief or missing people that were once present in our lives,” relationship and dating expert Sarah Ryan said to HuffPost.

The good news is understanding these emotions can help us be gentler with ourselves when those waves of nostalgia or grief hit. Instead of fighting these feelings or beating ourselves up for not being “festive enough,” experts suggest creating space for both joy and melancholy.

As Marques emphasizes, the most important thing you can do is allow yourself the space to feel. “Emotions are 100% part of life,” she said. “And if you feel them, they tend to come down. Allow yourself to feel your grief and know that it is actually the psychologically healthy thing to do.”