Adversity happens.

Our instinct in the workplace when adversity does arrive is to deny its importance, attribute it to a person or event outside of our control, or, even better, to ignore it. Frustration and failure are unavoidable, so the question for us is what can be gained when they do come?

Too often, we foolishly think there is nothing within an adverse moment or chaotic experience that can hold deeper meaning for us beyond sheer survival. But in embracing and learning from challenges, failures and mistakes, there is a path toward greater personal and professional tenacity and resilience.

In her commencement address at the University of California, Berkeley, May 14, Sheryl Sandberg, the chief operating officer of Facebook and author of The New York Times bestseller “Lean In,’’ described her own personal challenges with adversity after the unexpected death of her husband in 2015, and how she was able to recover through a cultivated and practiced resilience.

“And when the challenges come, I hope you remember that anchored deep within you is the ability to learn and grow. You are not born with a fixed amount of resilience. Like a muscle, you can build it up, draw on it when you need it,” Sandberg said.

Sandberg’s recommendation to graduates to grow their resilience was good advice. The ability to withstand the hurricane-force winds of economic upheaval, career setbacks and professional failure is essential at a time when unpredictability is a hallmark of today’s workforce.

By recognizing your challenges, you are able to strengthen your core, making your difficulties the building blocks of your future success. With an open mind and a commitment to learning, you deepen your reservoir of resilience and find yourself better prepared for the next adverse moment that could sideline your career or your company.

What does surviving adversity teach you as a leader and as an individual? Beyond resilience, these moments give you insights into how you handle problems (head on or sideways) and what tools you’re able to employ in addressing difficulties (processes and practices you might have put into place). They also help you determine how best to motivate your colleagues to work collectively or individually to resolve problems.

Admittedly, resilience, like “grit,” has become a popular notion in business literature—a cure-all for downturns in careers or bumps in the road for organizations. It makes sense, however, that an individual or company has a better chance of surviving adversity if they’ve been tested once or twice before.

An example of this is the story of Chandra and Sanjay, who are married and own several foot trucks. Chandra worked for a food incubator, and Sanjay served as a sous chef for a local restaurant. After three years, the two had saved enough money to open their own Indian food truck. Yet, operating the food truck proved difficult despite their combined experience. Local regulations, food costs, equipment failures and even inclement weather nearly sidelined their first truck. After a showdown with a vendor over food prices, they learned to use multiple vendors to provide similar products, ensuring competitive pricing and reducing dependency. With each roadblock, the two not only mastered the problem, they also developed the emotional tools to handle adversity and not shrink back in fear or confusion at the inevitable next hurdle.

Both small and large misfortunes help you develop the mental toughness and the mindset to fight back. Armed with knowledge and experience, you are able to fine-tune your skills at solving problems and aren’t overwhelmed by the course of events. For Sanjay and Chandra, facing adversity rather than looking for ways to avoid it expanded their capacity for problem solving. Today, they own three food trucks, and they’re planning to open a restaurant of their own.

By bringing a commitment to listening and learning—and adaptability to new circumstances—you are able to better formulate solutions. You can reach back to past difficult situations to consider how best to manage the current one. You can seek help from others to work cooperatively to solve problems. You also can break difficulties into bite-sized chunks to make them easier to vanquish.

Another benefit of adversity is that it teaches you how to play the game, including when losing, with a winning attitude. These skills make it easier to accept new responsibilities, even if you’re not certain that you’re ready. Few of us ever feel ready when contemplating the unknown, but an individual accomplished in pushing through conflict to resolution is always able to respond.

Adversity may not be welcome but it should not be feared. Each adverse experience gives us a chance to build our capacity for resilience and to fill our adversity toolbox with the skills we need to respond efficiently and effectively. Adversity happens, but we determine what to make of it.

James Bailey