Harvard Business Review discusses the steps to rebound from career setbacks. They argue those who rebound actively explore how they contributed to what went wrong, evaluate whether they sized up the situation correctly and reacted appropriately, and consider what they would do differently if given the chance. They also gather feedback from a wide variety of people (including superiors, peers, and subordinates), making it clear that they want honest feedback, not consolation.
HBR states the approach laid out can help transform the anger and self-doubt associated with failure into excitement about new possibilities.