A setback has often cleared the way for greater prosperity. Many things have fallen only to rise to more exalted heights.—Seneca the Younger
No matter how self-disciplined you are, there’s no escaping the fact that sometimes you’ll stumble. Perhaps you’ll eat a piece of a cake instead of a salad. Maybe you’ll skip a workout out of laziness. It’s possible that when your efforts result in a failure, you’ll lose the self-discipline to continue and revert back to your old undesirable habits.
It’s all par for the course, and the sooner you accept, it, the easier it will be to handle the setbacks once they occur. However, don’t consider your failures a useless waste of time and energy; a failure can often present new opportunities or lead to important realizations.
I failed to learn how to play tennis despite putting considerable amount of time, energy, and money into it. However, this made me realize that I wanted to concentrate on rock climbing, and the failure with tennis cleared the way for dramatic improvements in my climbing performance.
When discouraged, remember that all struggles present opportunities that, given enough time, you can convert into successes or lessons that will aid you in other areas of life.