I have long advocated not having regrets in life.
You may acknowledge that perhaps if you had a chance to go back you might do it differently, but to me the key is to ensure that you learn as much as possible from the experience. That way, if ever actually faced with a similar decision or choice you have valuable experience and information to factor in this time around.
No matter the situation, no matter how bad it seems, there is always something you can learn from it. You can examine how you reacted, what you chose or decided, what you said, how other people reacted to you, what could have been done and wasn’t. You took one path, and only one, to get where you are, and at every possible moment a choice was made to take that path. There are innumerable paths not taken, and each of them provides a lesson for you.
The longer that you sit and wallow in regret, the longer it is before you can truly benefit from the lessons available to you. Regret itself serves little purpose. It is far more productive to identify why you feel bad, and then identify what you can take from that. The sooner you do that, is the sooner you can move on to the next step and the next path from where you are.
And none of this is to say that you will not make those same mistakes again. Sometimes a lesson bears repeating before it is truly learnt, but even then, regret not the repetition, but learn from your inability to put the original lesson into practice.
It may sound like an over-simplification, but we are all active engineers in the course our lives take, so invest in the learning and then continue onwards towards the goal.