A passing thought:
Don’t see something you fail at as a complete failing. Use that opportunity to think about how you can go on to make what you failed at a success. What if you were to lose your job? Instead of thinking you’ve failed, use that time to think about what new direction you would like to go in, what changes you would like to make and with whom. When we learn from our failings, those failings are what potentially can make us successful.