Throughout my childhood, I did rather well in academics (I sucked in sports though). I performed consistently well across primary school, high school, college and my first job. So much so that it became part of my identity. I was the guy who did well among peers.
When I joined Thoughtworks, I was among peers who were in a different class than me in every possible way (and were very humble about it). And my sense of identity came crashing down on me. I didn't know who I was anymore and it took me 8 months to learn who I was again.
If you are someone like me, let my story serve as a warning. Don't let your accomplishments define your identity and don't let your failures destroy it. Instead learn from them both and make your own happiness.