There's an alternative to dwelling on your mistakes. You can learn from them.
It's a good theory, anyway. Maybe the reason your subconscious dredges up all these miserable ghosts is that they need to get closure before they can rest peacefully in humiliation afterlife.