Answer:
mood-congruent memory.
Step-by-step explanation:
Mood congruent memory refers to the association of the mood with the memories. In other words, we not only store memories in our minds but also the memories of the mood of that time. Therefore when we come across a happy state we tend to remember the happy memories and vice versa.
As per the question whenever David thinks about the painful memories of his girlfriend he tends to remember other painful events of his life.