What is the evolutionary advantage of regret?
Very interesting question.

First I'd like to highlight that this question relates to a very hypothetical field of evolutionary biology which is evolutionary psychology. This wikipedia article on evolutionary approaches to depression might be of interest as well. One sentence says: "Feelings of regret associated with depression also cause individuals to reflect and analyze past events in order to determine why they happened and how they could have been prevented". It basically says the same thing than you said in your question.

What other advantages might "regrets" have? Before trying to answer it, I'd like to ask : is it necessary that it has advantages? A behavior or a feeling might as well be a by-product of selection for big brains. It might therefore not be selected for but it exists only because there is not much selection against this by-product trait.

Our brain are often considered to have evolved for social purposes. I would hypothesize that if someone express "regrets", he might benefit from other's care and pity. And the best way to express "regrets" is to feel the "regrets". Robert Trivers would maybe say that in order to fool someone else (make someone else think we regret) the best thing to do is to fool ourself (make ourself feel "regrets"). See his book, the folly of fools.