I don't think any part of our brain is "responsible for optimizing contentment" or "deleting traumatic memories."
In evolutionary terms, individual organisms are optimized for reproducing and living long enough to give their offspring (more accurately, their genes) a good shot at survival. Richard Dawkins explains that in The Selfish Gene and other books. "Contentment," a human social construct, and classifying a memory as "traumatic" probably have little to do with what evolution has optimized us (or any organism) for. If we reproduce and pass on our genes, then slowly die a miserable and traumatic death, that makes no difference in terms of evolution.