People think that the purpose of memory is to remember the past. That’s not the purpose of memory.
The purpose of memory is to extract out, from the past, lessons to structure the future. That’s the purpose of personal memory. So, you’re done with a memory when you’ve extracted the information that you can use to guide yourself properly in the future.
If you have a traumatic memory, for example, that’s obsessing you, if you analyze that memory to the point where you figured out how you put yourself at risk. You can determine how you might avoid that in the future, and then the emotion associated with that goes away.