Humans have the unique ability to recall the past in detail and learn or regret. Perhaps animals are fortunate that they don’t seem to have this ability. I am sure they learn but I suspect that they don’t ruminate over mistakes. They don’t seem to regret, feel guilt, stew with resentment or hold onto grudges long after the details have been forgotten.
It is very important to learn from the past regardless of whether it is a positive or negative memory. Once the lesson is learnt, it is time to let go of the memory. It won’t disappear but we can stop ruminating or giving it mindspace.
Visiting the past too much will spoil the present which is all we have. Even a positive visit takes you away from the present.
Next time you feel regret, focus on what you are doing with your full attention. Focusing on your breathing will snap you into the present.