A nice New York Times piece summarizing the purpose of nostalgia:
Most people report experiencing nostalgia at least once a week, and nearly half experience it three or four times a week. These reported bouts are often touched off by negative events and feelings of loneliness, but people say the “nostalgizing” — researchers distinguish it from reminiscing — helps them feel better.
To test these effects in the laboratory, researchers at Southampton induced negative moods by having people read about a deadly disaster and take a personality test that supposedly revealed them to be exceptionally lonely. Sure enough, the people depressed about the disaster victims or worried about being lonely became more likely to wax nostalgic. And the strategy worked: They subsequently felt less depressed and less lonely.
Nostalgic stories aren’t simple exercises in cheeriness, though. The memories aren’t all happy, and even the joys are mixed with a wistful sense of loss. But on the whole, the positive elements greatly outnumber the negative elements, as the Southampton researchers found by methodically analyzing stories collected in the laboratory as well as in a magazine named Nostalgia.
I’ll forever associate nostalgia with this Mad Men bit on “The Carousel”: