In the course of a single year, University of Maine climate scientist Jacquelyn Gill lost both her mother and her stepfather. She struggled with infertility, then during research in the Arctic, she developed embolisms in both lungs, was transferred to an intensive care unit in Siberia and nearly died. She was airlifted back home and later had a hysterectomy. Then the pandemic hit.

Her trials and her perseverance, she said, seemed to make her a magnet for emails and direct messages on Twitter "asking me how to be hopeful, asking me, like, what keeps me going?"

Gill said she has accepted the idea that she is "everybody's climate midwife" and coaches them to hope through action.

Hope and optimism often blossom in the experts toiling in the gloomy fields of global warming,COVID-19 and Alzheimer's disease.

How climate scientists like Gill or emergency room doctors during the height of the COVID-19 pandemic cope with their depressing day-to-day work, yet remain hopeful, can offer help to ordinary people dealing with a world going off the rails, psychologists said.

"I think it's because they see a way out. They see that things can be done," said Pennsylvania State University psychology professor Janet Swim. "Hope is seeing a pathway, even though the pathway seems far, far away."

United Nations Environment Programme Director Inger Andersen said she simply cannot do her job without being an optimist.

"I do not wish to sound naive in choosing to be the `realistic optimist,' but the alternative to being the realistic optimist is either to hold one's ears and wait for doomsday or to party while the orchestra of the Titanic plays," Andersen said. "I do not subscribe to either."

Dr. Kristina Goff works in the intensive care unit at University of Texas Southwestern Medical Center and said at times she felt overwhelmed during the pandemic. She keeps a file folder at home of "little notes that say `hey you made a difference."'

"I think half of the battle in my job is learning to take what could be a very overwhelming anxiety and turn it into productivity and resilience," Goff said. "You just have to focus on these little areas where you can make a difference."

Alzheimer's disease may be one of the bleakest diagnoses a physician can convey, one where the future can appear hopeless. Yet Dr. Ronald Petersen, director of the Mayo Clinic Alzheimer's research center and a man colleagues describe as optimistic and passionate, doesn't see it that way.

"I don't think it's depressing. I don't think it's gloomy. It's difficult. It's challenging," Petersen said. But "we're so much better off today than five years ago, 10 years ago."

The coping technique these scientists have in common is doing something to help. The word they often use is "agency." It's especially true for climate researchers -- tarred as doomsayers by political types who reject the science.

Gill, who describes herself as a lifelong cheerleader, has also battled with depression. She said what's key in fighting eco-anxiety is that "regular depression and regular anxiety tools work just as well. And so that's why I tell people: `Be a doer. Get other there. Don't just doomscroll.' There are entry level ways that anyone, literally anyone, can help out. And the more we do that, `Oh, it actually works,' it turns out."

It's not just about individual actions, like giving up air travel, or becoming a vegetarian, it's about working together with other people in a common effort, Gill said. Individual action is helpful on climate change, but is not enough, she said. To bend the curve of rising temperatures and the buildup of heat-trapping gases, steady collective action, such as the youth climate activism movement and voting, gives true agency.

"I think maybe that's helped stave off some of this hopelessness," she said. "I go to a scientific meeting and I look around at the thousands of scientists that are working on this. And I'm like `Yeah, we're doing this."'

Northern Illinois University meteorology professor Victor Gensini said that, at 35, he figures it's his relative youth that gives him hope.

"When I think about would could be, I gain a sense of optimism and create an attitude that this is something I can do something about," Gensini said.

The U.N.'s Andersen is a veteran of decades of work on ecological issues and thinks this experience has made her optimistic.

"I have seen shifts on other critical environmental issues such as banning of toxic material, better air quality standards, the repair of the ozone hole, the phase-out of leaded petrol and much more," Andersen said. "I know that hard work, underpinned by science, underpinned by strong policy and yes, underpinned by multilateral and activist action, can lead to change."

Deke Arndt, chief of climate science and services at the National Oceanic and Atmospheric Administration's National Center for Environmental Information, said what buoys him with an overwhelming optimism is his personal faith, and remembering all the people who have helped his family over the generations -- through the Dust Bowl for his grandparents and through infertility and then neonatal issues for his son.

"We've experienced the miracle of hands-on care from fellow human beings," Arndt said. "You kind of spend the rest of your life trying to repay."

"Where people are suffering not through their own purchase, that makes me want to recommit as a scientist and a Catholic," Arndt said. "We've got to do as much as we can."

What's more, Gill and several others said, the science tells them that it is not game over for Earth.

"The work that I do inherently lends me a sense of agency," Gill said. "As a paleo-ecologist (who studies the past) and climatologist, I have a better sense of Earth's resilience than a lot of people do."

It helps that she studies glaciers. Even though they shrink, they're still there when she returns to visit them, so far. She pointed to Georgia Tech climate scientist Kim Cobb, who spent much of her career diving and studying the same coral reef in the Pacific, only to return in 2016 and find it dead: "God, I cannot imagine what a gut punch."

Cobb laughed heartily when she heard how Gill described the life of a reef scientist.

From 1997 to 2016, Cobb dived at one of the tiny islands of Kiritimati in the Pacific, monitoring the effects of climate change and El Nino on a delicate coral reef there. Super hot water killed it in 2016, with only faint signs of life clinging on.

That fall, Cobb made one last trip. It was during the elections. A big Hillary Clinton fan, Cobb was wearing a Madame President shirt when she heard the news that Donald Trump was elected. She said fell into a pit of despair that lasted maybe a couple months.

"And then on New Year's Eve, I decided that I probably had enough and I know my husband had enough, my kids had had enough. So people needed their mother and their wife back," Cobb said. "I decided to grope for another path out there."

"I am not able to wallow for so long before I start asking myself some questions like, `Look you know how you can put your position to work? How can you put your resources to work?"' Cobb said.

She and her family cut their personal carbon emissions 80%. She doesn't fly on planes anymore. She went vegan, composts, installed solar panels. She works on larger climate action instead of her more focused previous research. And she bikes everywhere, which she said is like mental health therapy.

She tells people when they are anxious about climate change, "there's not going to be a win, a shining moment where we can declare success," but "it's never going to be too late to act. It's never going to be too late to fix this."

NOAA's Arndt said the climate of the 20th century he grew up with is gone forever. He grieves the loss of that, but also finds mourning what's gone "weirdly liberating."

With climate change "we have to kind of hold hope and grief at the same time, like they're kind of twins that we're cradling," Maine's Gill said. "We have to both understand and witness what has happened and what we've lost. And then fiercely commit to protecting what remains. And I don't think you can do that from a place of hopelessness."

------

Associated Press climate and environmental coverage receives support from several private foundations. See more about AP's climate initiative here. The AP is solely responsible for all content.