The truth is that getting fired is one of the best things that can ever happen to you, if you look at it the right way. There is certainly no reason to consider it the end of the world. It can be the beginning of great things. It sounds like a cliche but it is actually true. Getting fired inspires you toward a higher degree of excellence, and it teaches you important lessons about getting overly attached to a single path for your career.
Source