Depends a lot on the mistake and your life since then. Is it something you could still fix today? Is it a mistake you keep repeating? Is it a huge mistake that still directly impacts your relationships and today in some way?
I think mistake is an overused word, and a choice that qualifies as a mistake in the future may not be judged as a mistake now.
Simply put... we make choices based on the information we have now. And our future judgment of our choices should account for the information we had back then, most of which has probably been forgotten.
But to answer your question, we shouldn't regret our mistakes but it is very good to remember them.
I think the correct answer in terms of mental health is: as little time as possible.
The actual answer is more complicated. Someone who got locked up for 25 years knowingly committing a significant crime might regret it for the majority of their sentence, at least.
I don't think this is true at all. Living your life ignoring all of your past mistakes can be just as unhealthy as dwelling on them needlessly. Dwelling on past mistakes can lead to hopelessness and depression, but ignoring them entirely can lead to narcissism and repeating damaging patterns.