Regret can prompt you to reflect on your behaviour, to learn which sorts of behaviour work well and which don’t, and thus to improve yourself in the long run. The emotional pang of regret can help you to understand that you ought to make a change – and then push you to follow through. https://psyche.co/guides/how-to-deal-with-regret-to-make-it-bearable-even-inspiring