There is nothing you can do about the past. Living there means that you are not living here in the present. Whatever happened in the past is over, and reliving it in your mind changes nothing—except your state of mind.
The future isn’t a good place to live either. Worrying about what will be, what will not be, what will happen, and what won’t doe not do anything to change the future. Worrying about the future isn’t useful. That leaves you with only one other option: Now.
If you have done something you regret, something that causes you to feel negative emotions, that event occurred in the past. The only reason it changes your state is because you are reliving it and giving it more meaning. Allowing your focus to go there means your focus is not here, that you are not focused on now. Now is the only time where you can make amends for the mistakes you have made in the past, and it is the only time you can forgive yourself, should that be something you need to do.
If you want to secure your future from the things you worry about and over which you have some level of control, you can only do the things now that will make a difference when that future arises. Worrying about things over which you have no control is to pull yourself out of the now to some imagined horror that isn’t even real; it is imagined. The only way you can improve your future is by doing something about it today, right now.
Effectiveness now requires that you give yourself over to the present moment, refusing to be distracted, and refusing to distract yourself by being somewhere other than where you are right now. Stop reliving the past and do the important work now.