Preparing for competitive exams are difficult no matter how talented you are. Especially in exams like the UPSC, where you have to dedicate your life to it and even with that every domino must fall exactly the right way for you to qualify. So, it can be tough if you fail. How do you get back from that?
Well, someone asked the same thing on Reddit- How did UPSC aspirants who failed manage to pick themselves up and what they did after that!
Sometimes things just don't work out and that's okay, I guess.