The most effective way of creating a strong sense of efficacy is through mastery experiences. Successes build a robust belief in one's personal efficacy. Failures undermine it, especially if failures occur before a sense of efficacy is firmly established.

If people experience only easy successes they come to expect quick results and are easily discouraged by failure. A resilient sense of efficacy requires experience in overcoming obstacles through perseverant effort. Some setbacks and difficulties in human pursuits serve a useful purpose in teaching that success usually requires sustained effort. After people become convinced they have what it takes to succeed, they persevere in the face of adversity and quickly rebound from setbacks. By sticking it out through tough times, they emerge stronger from adversity.

- Albert Bandura/Self-Efficacy

Besides mastery, we can boost self-efficacy by being around people who are successfully and not-yet-successfully tackling similar goals. The successful ones serve as role models as well as sources of feedback, advice, support, and encouragement. The less successful ones give us the opportunity to be role models and provide feedback, advice, support, and encouragement. Being around similar others pursuing similar goals also provides an ongoing reality-check about our own level of mastery.

Taking care of small subgoals and tasks are "mini-mastery" experiences that can help us feel less overwhelmed or anxious because it gives us a sense of accomplishment. And having a sense of accomplishment helps us feel more confident of our ability to achieve the goal. One should plan to have mini-mastery experiences every day: something a bit challenging but still doable to gets us closer to our goal. Doesn't mean to avoid the hard stuff, but it's nice to sprinkle the hard with the pretty easy to keep us motivated.

Success won't increase self-efficacy unless we recognize success. We need clear goals, clear plans, clear markers of progress and a good  understanding of the obstacles in our way, so we'll know when we've actually accomplished something. We might have to pause for a moment and reflect: that was actually hard but I did it! I'm making progress!

It's important to stray out of one's comfort zone.  Overcoming difficulty provides a sense of accomplishment that nourishes self-efficacy. Repetition of well-learned competencies is important to maintaining core skills but doesn't build self-efficacy like powering through uncharted territory.

Motivation matters, especially with long-term goals and difficult challenges, where setbacks, failure, and discouragement are just part of the game.  Figure out what keeps you going and what makes you want to quit.

So what is likely to keep us motivated? Next.

Reference:

Bandura, A. (1994). Self-efficacy. In V. S. Ramachaudran (Ed.), Encyclopedia of human behavior (Vol. 4, pp. 71-81). New York: Academic Press. (Reprinted in H. Friedman [Ed.], Encyclopedia of mental health. San Diego: Academic Press, 1998).