When Pope Francis delivered a surprise TED Talk in late April, he called for powerful people to use their influence to care for others.

Somewhere Hillary Clinton was watching. It had been a little more than six months since she had endured the greatest disappointment of her lifetime and was still feeling bitter about her unexpected loss to Donald Trump. She was angry about the bullies at Trump rallies who were never called upon to show empathy in the same way that her supporters were for them.

But as she reflected on the pope’s words during her now-famous walks in the woods near her Chappaqua, N.Y., home, she realized she needed to heed his advice to open her heart to all.

In her new campaign memoir, “What Happened,” Clinton shares how the pope’s message of inclusion helped her heal. She writes: “He called for a ‘revolution of tenderness.’ What a phrase! He said, ‘We all need each other, none of us is an island, an autonomous and independent ‘I,’ separated from the other, and we can only build the future by standing together, including everyone.’ ”

When the pope addressed the international TED conference in a pretaped video (no, he did not stand center stage in front of the signature red block TED letters), he subtly referenced the shift toward isolationism and fearmongering that spread across America and many European countries last year.

“Thank God, no system can nullify our desire to open up to the good, to compassion and to our capacity to react against evil, all of which stem from deep within our hearts,” he said.

By coincidence, the pope made his remarks exactly one year after Clinton released a campaign commercial called “Love and Kindness,” a phrase she used on the trail to counter Trump’s inflammatory rhetoric. But she suggests in her book that in the aftermath of the election she lost sight of that.

Clinton has a deep faith. She taught Sunday school and receives daily devotions. She has spoken about her United Methodist upbringing and the role religion has played in her life. She has said that she’s turned to her faith during challenging times. This idea of love and kindness is one that has spiritual roots across religions and is emphasized in the Christian religion.

In the book, she writes that the pope’s talk inspired her to embrace “radical empathy,” the idea that despite our deep societal and ideological divides it’s crucial to “recapture a sense of common humanity” and to “try to walk in the shoes of people who don’t see the world the way we do.”

President Trump met Pope Francis about a month after his TED Talk. Throughout the campaign, the pope did not hold back his critiques of Trump’s policies, at one point calling his plan to build a wall along the Mexican border as “not Christian.” When they met at the Vatican in May, the pope gave Trump a science-based book about the moral responsibility to protect the environment. Then this week, Francis said if Trump was “pro-life” he would extend the Deferred Action for Childhood Arrivals program that allows undocumented immigrants brought to America as children to stay.

Ultimately what Clinton took away from the pope’s message was that she was faced with two choices for how she wanted to live out the rest of her life:

“I can carry around my bitterness forever, or I can open my heart once more to love and kindness,” she wrote. “That’s the path I choose.”