On holidays, it's natural to feel a longing for times gone by—a childhood spent singing carols or meals spent with now departed loved ones. Recently scientists have explored the bittersweet feeling of nostalgia, finding that it serves a positive function, improving mood and possibly mental health. A new paper illuminates why it works, finding that this sepia-toned sentiment does not cement us in the past but actually raises our spirit and vitality.

In several experiments conducted online and in the laboratory, when subjects were induced to experience wistful reverie via sentimental song lyrics or memories, they reported greater self-continuity, as measured by a validated index that asks participants how much they agree with statements such as “I feel connected with my past” and “important aspects of my personality remain the same over time.” Constantine Sedikides, a psychologist at the University of Southampton in England and the primary author of the paper, which was recently published in Emotion, had shown this effect in a 2015 paper. But here they found that nostalgia boosted self-continuity by increasing a sense of social connectedness. Sentimental recollections often include loved ones, which can remind us of a social web that extends across people—and across time.

The researchers found this pattern in American, British and Chinese participants. They also went a step further and observed, via questionnaires about other concurrent feelings, that self-continuity brings a feeling of vitality—of “energy and spirit.”

Tim Wildschut, one of Sedikides's Southampton collaborators on the paper, notes there are many ways people elicit nostalgia—looking at photographs, cooking certain meals, sharing stories or playing music. He calls the feeling, which we naturally experience several times a week, “a psychological immune response that is triggered when you experience little bumps in the road.” So if you are feeling a bit discombobulated over the holidays, pull out a photo album and spend some time revisiting your past.