Failure should update your method before it updates your belief in yourself.
REFLECTION
REFLECTION
The first thing to change after a failure should be the method, not your assessment of your own worth. Method is what actually produced the outcome and what you can actually revise. Rewriting your self-belief instead leaves the faulty process intact and adds a second problem.
When something fails, go straight to what you did and how, in detail. Fix something there. Save any conclusions about your capability for much later, if ever.
Did your last setback change your process or only your confidence?
Free, with nothing to buy inside it.