I think nostalgia starts from over-idolizing the past in general, to the point in which if your brain chose to the present just can't compete against, mainly because it compares that perfect moment in the past seen through pink glasses to long periods of times, it's a loss by default that's why getting lost in nostalgia is dangerous, because the nostalgia might from a bad moment in the present, getting lost in it is downward spiral as the more you're lost in it the more you are dissatisfied with the present creating that spiraling paradoxical circle. In that sense yeah it is.
However, you can't attribute nostalgia to one thing. sometimes it's easily triggered by a smell of food, it helps identify the good in life by how similar it is to when you were happy.So it is nostalgia can used to recognize good and bad by comparing how you feel about the current moment compared to how you felt in the past.