Never indulge in self-reflection?

Here is a quote I came across today.

Never indulge, at the close of an action, in any self-reflective acts of any kind, whether of self-congratulation or self-despair. Forget the things that are behind, the moment they are past, leaving them to God.

I am not sure if I agree with this or not to be honest. Where does the learning from our past come into place? Won’t we be making the same mistakes over and again? But I also see the upside of letting pride creep into our life or even depression from our failures.

So, can we remember dispassionately? Or should we? I will let you reflect on it and will get back to you later on this. Or not, since I am to leave it in the past.