Earlier this year, Melinda French Gates made news for her announcement that she was leaving the foundation she started with her former husband, Bill Gates. The foundation the pair started 25 years ago was not only one of the largest private charity groups but also one of the most influential–giving away more than $78 billion since its inception. That French Gates was walking away was, and is a big deal.

Melinda French Gates.

On the other hand, it’s not that surprising. It did seem likely that–after divorcing her husband–she would want to move on to other things. French Gates pointed at the Supreme Court decision overturning Roe versus Wade as the final motivation to make a shift in her philanthropy to fit what she cares most about. In her announcement, French Gates said that she would leave with $12.5 billion toward her own foundation focused on the needs of women throughout the world.

On French Gates’ last day at the foundation in June, she sent a note to her colleagues thanking them for their work:

Before I wrap up my last day at the foundation, I wanted to reach out to thank each one of you for the role you played in my time here and for all the work we did together.

As you might imagine, I’m holding a complicated mix of emotions today. I’m sad to be saying goodbye, proud of all we accomplished, energized by what’s ahead, and excited to see what you do next. But the emotion I feel most strongly right now is gratitude.

Reading through those paragraphs, it seems like what you might expect French Gates to say. I’m not at all surprised that she wanted to take the time to thank the people she has worked with closely for so long. And, it’s not at all surprising that French Gates is experiencing a “complicated mix of emotions.”

I imagine that French Gates has been through many different emotions over the past few years. Divorce is one of the most life-altering traumas anyone can go through. Leaving an organization you helped to start–and then led for a quarter century–is probably pretty high on the list of grief experiences as well.

The last sentence, however, says a lot. “The emotion I feel most strongly right now is gratitude.”

Actually, it’s that single last word that sticks out. Gratitude. It’s not necessarily the word you might expect. It caught my attention because it’s a powerful lesson for every leader. You see, gratitude is a choice. It’s a decision you make about your perspective, regardless of the circumstance. It is an intentional effort to recognize the good despite the fact that life is complicated and hard.

It’s not always a given that we will be able to see that good, especially if we’re not looking. It’s easy to become overwhelmed by the complicated parts of our lives or jobs. It’s easy to just want to quit when things get hard. But gratitude is an intentional shift in how we view all of it.

For French Gates, a lot of that seems to come down to the people. “Most people never in their lives get to work with a group of people like this one–as talented, as brilliant, as caring, as visionary, as thoughtful, as driven,” she wrote. “So I recognize what a gift it is that, for the past twenty-five years, you’ve been such an enormous part of my life. I’m incredibly impressed by you and so glad to have had this chance to work with you.”

I think the lesson here is pretty simple: even when we don’t get to choose our circumstances, we do get to choose our perspective. Too often, we allow our emotional response to a situation to dictate our perspective. We become consumed by anger or grief or disappointment, and that becomes our outlook. We let our emotions determine how we see our situation.

As French Gates demonstrates. we can choose to think differently about our situation. We can look at what we face and decide that we’re going to focus on the good in our situation, which has the benefit of changing how we feel about it. As a leader, it might just be one of the most important lessons you can learn.