Regret makes us feel worse, but it can make us do better. Indeed, the way it makes us do better is by making us feel worse.