Fortunately I learned this early in my career, and it has carried me through some very trying times. Trying to have my principal solve my discipline problems was not effective, so I learned how to solve them myself. I was not only successful, but I also gained confidence in myself as a problem-solver. Since then I have always identified weak areas in my teaching as well as areas of interest, and I have educated myself in those areas through professional associations, various publications, and discussions with colleagues. I openly share my failures with my students as well as how I am trying to overcome them, and I hope modeling this habit of mind will transfer to them as well.
Failures are just opportunities to learn.
If something is not working, scrap it. Do not hold on to behaviors, strategies, lessons, or units just because that is what you have planned. I used to be afraid to scrap a lesson for fear my supervisors or my students would think less of me. Throw it out, be honest with the kids or your supervisors about the reason for the deletion, think about why it did not work, and start over. It is not in my nature to be a dour old sourpuss, and I went into teaching partly because I did like the kids.