(CNN) — When Yale psychology professor Laurie Santos witnessed the severity of the depression, anxiety and stress her students were facing, she decided to do something about it.

Her “happiness” course — which she began teaching live in 2018 — became Yale’s most popular class in over 300 years, according to the university. But when the coronavirus pandemic struck, claiming millions of lives around the world and shutting down life as we know it, her class became more important than ever.

“People were getting great evidence-based advice about how to protect their physical health — mask up, socially distance, get a vaccine — but people were struggling with what to do to protect their mental health,” Santos told CNN.

In April 2019, Santos had 22,522 new enrollments. But in April 2020, as the pandemic started to take off, the class saw 860,494 new enrollments — and it only continued to skyrocket.

So far, more than 3.7 million people have enrolled in the class, which is available for free online through Coursera and is also being taught in person for the second time this semester.

The course went online for free about two years ago under the name “The Science of Well Being,” according to the Yale Daily News. Anyone can audit the course for free, and $49 lets you complete assignments, submit them for a grade and earn a certificate of completion.

Santos’ class focuses on understanding and letting go of all the superficial notions of happiness, such as the idea that a better job, fancier house, or a new relationship is the next step closer to happiness.

“All of us want to be happier,” Santos said. “The problem is that we have a lot of misconceptions about what really will make us happy. We think we need to change our circumstances in major ways, but often simply behavioral and mindset changes can make a big difference in our sense of well-being.”

Some of the professor’s “happiness” assignments include deleting social media accounts, daily meditation, keeping a gratitude journal, and investing time in loved ones.

Students also receive a series of homework “rewirements,” or practices aimed at helping students develop better habits, according to Santos. These include making more time for exercise and sleep, engaging in more social connection and random acts of kindness, taking time to savor and experience more gratitude, and mindfulness.

“I’ve personally become a lot happier as a result of teaching the class,” Santos said. “It’s given me a lot more meaning and purpose, but it also means I need to practice what I preach and make sure I’m putting in the time to focus on my own well-being.”

An intervention study written by Santos and four other researchers analyzing the impact of her class concluded taking the class allows people to show a significant improvement on a standard happiness scale, exhibiting about a one-point increase on the 10-point scale.

“The present study demonstrated that well-being can be enhanced by taking a large-scale, free, online course,” the study read. “These results suggest that individuals who are exposed to academic content on the science of well-being and who engage in evidence-based practices can indeed increase their subjective well-being.”

The study also showed how free, online classes can “impact mental health at large scales, and thus could become an important tool for public health initiatives aimed at improving population-wide mental health outcomes.”

The-CNN-Wire™ & © 2024 Cable News Network, Inc., a Time Warner Company. All rights reserved.

Join our Newsletter for the latest news right to your inbox