Think back to your biggest failure, your most keenly felt regret. Now imagine sharing it with 50,000 or so followers on social media. 

If this little mental exercise fills you with dread, then think about how Gagan Biyani must have felt when his hands hovered over the keyboard ready to share the intimate details of his biggest ever screw-up with the world. Whatever mistake you look back at with mortification, Biyani's is probably bigger: He was the first chairman of Udemy, a startup that has since gone on to become a unicorn valued at $2 billion, and he was fired. 

That's a failure that dwarfs most of our minor professional missteps, but Biyani bravely shared the inside story of his downfall at Udemy on Twitter recently. Why? As Biyani notes, "Nobody talks about failure in Silicon Valley, yet 90 percent of startups fail." 

Brutal honesty about a brutal failure 

Startup dogma says if you're not failing periodically, you're not thinking big enough or taking enough risks, but ask almost any founder how they're doing and you'll hear some version of "Crushing it!" 

Plenty of members of the entrepreneurial community have pushed back against this disconnect, opening up about their struggles or organizing events at which entrepreneurs openly discuss their biggest screw-ups. Biyani joined this movement for more transparency with his series of revealing tweets. 

The whole thread is worth a read, but here's the basic story: Biyani was an abrasive, ambitious 21-year-old when he co-founded Udemy. While he was a gifted salesperson, his high-pressure, low-EQ style started to cause team dysfunction as the company grew. He got an executive coach but didn't manage to tune up his leadership skills in time. In the end, he was asked to leave the company. 

Your biggest failure is also your greatest learning opportunity. 

You might think he would be bitter about losing a seat on a rocket ship about to lift off, but "in hindsight," he writes, "I'm grateful." The fact that he came away from the experience owning a decent chunk of valuable stock certainly helped the medicine go down, but Biyani also says the experience was a "wake up call" that helped him "dig deep and learn to be more compassionate. I've led teams since with relatively good reviews. I've learned the art of 'Radical Candor.'"

It also taught him a handful of lessons he feels could help anyone facing a crushing failure: 

  • "You always lose a job for a reason. For me, managing was not natural. Get a coach and look inward. You'll learn!" Biyani writes, adding that this is true even if you feel you have been treated unfairly. "Someone smart believed you needed to go. That's a lesson," he insists. 

  • "Be classy on the way out. I left Udemy on good terms; I didn't cause trouble. It paid off; I kept a good reputation and Udemy treats me well." Surely, this is sound advice for anyone. 

  • "This too shall pass. It felt like the world had ended when I was fired, but it actually opened the door for my next opportunity. I learned so much from this," he concludes.  

The bottom-line lesson from Biyani's bracingly honest story is that it is possible to bounce back stronger from even the most stinging defeat, but only if you use your failure as an occasion for self-reflection. 

"If you were laid off, fired or rejected, ask yourself: what did I do to contribute to this situation? What can I do better next time?" Biyani advises. "Don't change who you are, but evolve and be willing to see opportunities for improvement. You will get another bite at the apple."