The mind is a set of information-processing machines that were designed by natural selection to solve adaptive problems faced by our hunter-gatherer ancestors.
The beauty of life is, while we cannot undo what is done, we can see it, understand it, learn from it and change. So that every new moment is spent not in regret, guilt, fear or anger, but in wisdom, understanding and love.