The setbacks you experience are wonderful opportunities to learn. Not only can you learn, in a critical sense, what you might have done wrong, but you also can come to understand what has led you to make the choices you’ve made.
Are you pursuing the goal you truly want? Are you pursuing a goal whose steps you are suited for? Practice gaining something every time things don’t go your way.