I am being challenged daily. As a frontline doctor, I find that the COVID-19 pandemic has not only tested my clinical abilities but also strained my capacity to bear witness to grievous suffering. This suffering extends well beyond the physical distress of hospitalized patients battling the virus. The pandemic has also spawned a mental health crisis beyond anything I have seen in 25 years of caring for patients. The statistics are overwhelming: CDC research indicates that 31 percent of Americans have reported anxiety and depression during the pandemic, and 11 percent have considered suicide. A national shortage in mental health clinicians existed before COVID-19. Now, health care organizations must decide how to rapidly scale and deploy behavioral health care to a geographically widespread and increasingly isolated populace. There is no time to wait for expansion of the mental health workforce.

Doctors are now turning to an unlikely solution: virtual reality (VR). When most people think of VR, they think of a gaming technology—a toy for pent-up teens to play first-person shooter games in their parents’ basement. But for decades, scientists around the world have been quietly discovering the surprising health benefits of VR for ailments ranging from severe pain, to PTSD, to substance use, to existential anxiety. Over 5,000 studies reveal that VR has an uncanny ability to diminish pain, steady nerves, and boost mental health—and best of all, it can be administered at home without a trained clinician.

VR works by creating a sense of psychological presence. When VR scientists speak of presence, they mean the technology has a unique ability to convey a sense of just “being there,” wherever there happens to be. It might be relaxing by the ocean or soaring in a hang glider or swimming with dolphins without leaving their couch. VR can even cause people to think and feel like another person altogether. For example, using a headset can enable people with depression to assume the body of Sigmund Freud and engage in self-counseling through his persona, allow people with eating disorders to experience life by way of a healthy avatar, and teleport people outside their own body so that they may gain new insights about the nature of dying. In all of these cases, if the VR is any good, the user feels transported to a new virtual environment and temporarily accepts it as reality. When used in the right way, at the right time and with the right patient, these virtual journeys can change mind and body for the better, all from the comfort of home.

Until recently, VR technology has been too expensive, unreliable and unwieldy for doctors to prescribe home-based virtual therapeutics. Now that’s all changed, and the timing couldn’t be better given the mental health crisis of COVID-19. In the past five years, multinational companies, including Facebook, Google, HP and others, have invested billions of dollars into developing and expanding the VR industry. As a result, explosive advances have been made in delivering low-cost, portable and high-quality VR to the masses. We have now reached an inflection point where the technology is cheap enough, its quality good enough and the science voluminous enough to think seriously about leveraging VR to improve mental health at scale with home-based treatments.

My lab at Cedars-Sinai Medical Center in Los Angeles, and others like it, has been on a journey to study whether and how VR can improve mental health. We created one of the largest medical VR programs in the world and have now treated several thousand patients with immersive therapeutics. In my book, VRx, I reveal how our team is using VR in the emergency department for helping patients with panic attacks, treating women in labor who are seeking to avoid an epidural, and managing patients with painful injuries. I discuss the research on how VR can treat irritable bowel syndrome, support stroke rehabilitation, steady tremors, manage schizophrenia and engage patients with dementia.

But it was the COVID-19 pandemic more than anything that has pushed us to move VR outside the walls of the hospital and into the community. Now, with the help of research funding from the National Institutes of Health, our team is shipping VR headsets directly to patients where they can receive mind-body treatments in vibrant, three-dimensional worlds—all in the privacy of their home and without the need for a live visit. Instead of prescribing another pill through a traditional in-person session, we might recommend a virtual beach vacation at home to ease aches and pains, or prescribe a course of cognitive behavioral therapy for people suffering from anxiety or depression.

In one program, called EaseVR, patients with chronic pain learn to control their mind and body through VR biofeedback therapy in a whimsical forest of glowing trees beside a shimmering lake. As the patient breathes in and out in sync with beating drums, the microphone in the headset detects the respirations and uses the input to drive a metaphorical visual narrative, allowing the user to breathe life into a dying tree or cause the sky to brighten a lustrous shade of blue. Virtual trees expand and contract in rhythm with breathing, like a huge arboreal lung exchanging air in sync with the patients’ body. Evidence shows this type of therapy not only helps in the short term, but can also alleviate pain, anxiety and depression well after the immediate treatment is over.

VR does all this by radically changing our perspective of the world. We can imagine being somewhere fantastical and healing. We can practice being the person we want to become. We can see ourselves from beyond and regard ourselves in a new light. We can empathize with ourselves and with others. We can confront our inner voice. We can transform our minds drastically and immediately, and when effective, forge healthy cognitions that last long after the headsets are removed.

VR is not just for gamers anymore. It is a new type of mental health treatment that can make things easier when times are hard.