After a failure, a focus on external causes may protect self-efficacy.
“Despite our best attempts to prevent self-regulation failure and stay motivated and focused (e.g., through goal setting or progress monitoring), setbacks can still occur.
While it is healthy and adaptive to take responsibility for a failure and aim to improve performance, blaming oneself—especially internal causes beyond one’s control (e.g., thinking that “I’m weak” or “I have no willpower”)—is dysfunctional and has a negative effect on motivation and self-confidence.
Blaming oneself is also often inaccurate because, in many situations, we underestimate—or are not even aware of—external factors that contributed to the failure. For example, you may not be aware of the effects of a medication, TV commercials, or friends’ eating behavior on your experience of hunger and ability to stick to a diet.”
Source: New Research on How to Overcome Setbacks