Failure can be your biggest motivator - if you let it. Do not get discouraged just because your goal was not achieved. Use your failure as a form of research. Instead of quitting or getting disheartened, evaluate what you may have done wrong or what areas you can improve. Then try again and make adjustments accordingly.
Don't think of failure as a setback instead consider it as an additional challenge and work hard to overcome the hurdle.