Failure is enriching. It's also important to accept that you'll make mistakes - it's how you build your expertise. The trick is to learn a positive lesson from all of life's negative moments.
Of all the causes which conspire to blind Man's erring judgement, and misguide the mind, What the weak head with strongest bias rules, Is PRIDE, the never-failing vice of fools.