When this happens in pursuit of your dream, don't focus on the closed door. Crawl through a window or tear a hole in the roof! Step back and do an assessment. What happened? What did you discover about yourself? What do you need to do? Who must you become to move forward in your life?
Whatever you do...don't give up simply because it becomes challenging. Don't expect life to make it easier for you to reach your goals. Make the decision to become a better person in order to accomplish your goals.