Reflection is good, brooding is not. But how do you break the cycle of negative thinking? It is great that human beings can reflect and learn from experience, but that is not the same as destructively dwelling on things. Going over things again and again serves no useful purpose and may well reinforce the sense of failure. It's a habit worth breaking.