Both serve the purpose of avoiding negative stimulus.
1. Nostalgia, the desire to minimize novel risks
This is an emotional sort of reminiscence where a person longs for a previous experience which was familiar and pleasant. It is the reverse of the motivation to seek out new experiences and take risks. I conclude that nostalgia indicates an intuition that the future is going to be more risky or unpleasant than the person’s innate risk/reward strategy allows, so that they will prefer to seek safety and comfort. It is analogous to the strategy, in an economic recession, of minimizing risks and protecting one’s existing assets.
This assumes a state that was previously higher than the oncoming recession, hence people who are chronically depressed do not experience nostalgia. But people who are getting frustrated and slipping into depression will almost certainly experience this as nostalgia. Similarly, people who are shifting into a lower risk/reward life strategy are going to experience this shift as nostalgia.
2. Re-experiencing trauma, the desire to minimize known risks
This is reminiscence on concrete stressful situations, rather than novel ones. Its function is similar to the mental rehearsal that athletes and performers do, except that athletes are rehearsing in order to achieve a pleasant outcome, and PTSD sufferers are rehearsing to avoid re-experiencing the unpleasant event. The more stressful the original event was and the more it seems likely to repeat in the future, the stronger will be the desire to relive and rehearse it over and over.
If for some reason a person doesn’t understand the causal mechanisms behind the stressful event, then they will also experience frustration during each of these rehearsals, and eventually depression. According to this model, all PTSD includes a measure of confusion, and sufferers will experience existential crises which must be resolved in order for the mental rehearsals to become productive and healthy.