A few years ago, I found myself in a job with a schedule that most of my friends would have killed for.

I joined a well-respected technology company in Silicon Valley. My team worked from home more often than not, which meant that even if I did choose to embark on the two-hour Bart/CalTrain odyssey to work, it was rarely worth my time. I’d walk into a mostly empty office, my entire team working from their home offices, and I would have wasted four full hours of my day on public transportation. So, I worked from home most of the time, too.

At first, it was like a dream. I mean, who really wants to wake up at the crack of dawn and drink a disproportionate amount of coffee just so they can keep their eyes open during their long commute to work? Or sit in a cubicle all day when they could work from the comforts of their own home? And who really wants to put on pants? Working from home, I could sleep till 9, roll over, grab my laptop, and answer emails from bed, propped up by a mountain of pillows. Gone were the days when I’d wake up at 6am to blowdry my hair and put on makeup.

So, why was I so depressed?

It started with an unshakable sense of unease. I’d wake to a racing heart and clammy hands, worried over what seemed like nothing. The anxiety and lack of structure made it difficult to focus on my work. I began to feel more and more like an imposter – was I really a communications specialist? Or was I just a fraud in pajamas and bedhead?

A terrifying loneliness began to grow inside of me. I tried to distract myself by working in nearby cafes. That made it worse. I found myself surrounded by people in business clothes meeting over coffee and there I was, sporting sweatpants and a baseball cap, feeling completely and utterly alone.

My enthusiasm toward my company dwindled due to the lack of face-to-face interactions with my team. I yearned for connection, intelligent conversations, or even just somebody with whom I could share lunch. I felt incredibly entitled – why didn’t I appreciate my freedom?

But here’s the thing: Humans need to be around other humans. Research by neuroscientists reveals that loneliness can result in actual physical pain. Other studies show that isolation raises levels of stress hormones and inflammation in the body and leads to poor sleep, a compromised immune system, and cognitive decline. And it’s no secret that solitary confinement inflicts a heavy toll on the mental health of inmates.

Still, I had no immediate solution. So here’s what I did in the meantime:

I developed a routine

Every morning, my alarm went off at the same time. I reserved time before work hours to make coffee, write in my journal, and get dressed; whatever self-care I needed to feel ready for the day.

I teamed up with a remote coworker

My friend had recently left her job and was searching for a new one. During this time, we committed to working together M – F at a local coffee shop. We kept each other company while we worked and the baristas learned our names. This helped us both feel a bit less disconnected from society.

I scheduled meetings

To make up for my lack of face time with team members, I booked weekly check-ins. I wrote articles for the CTO, so I’d interview him regularly. His passion for the technology space rubbed off on me, momentarily reigniting my own passion for the work I was doing.

I went outside (and moved my body often)

This was crucial. For me, it was too easy to sit indoors all day. That’s why I’d plan morning yoga classes, daily walks around my neighborhood, bike rides to the coffee shop, or lunch in the park.

I saw a therapist

I couldn’t drag myself out of the WFH-induced anxiety and depression that I was experiencing alone. I needed help. Evidence-based therapies such as CBT or ACT, in particular, armed me with valuable tools that helped me better understand my feelings and empowered me to make necessary changes. Connecting with my therapist in-person assuaged my feelings of alienation and helped me move forward with my marbles intact.

I found a new job

Eventually, I had to face the facts: I needed to quit to protect my sanity. During my job hunt, I prioritized companies with a mentally healthy workplace – one that valued in-person collaboration and teamwork. After my yearlong WFH experience, I knew what to look for in my next role and what to dismiss.

The bottom line: We’re wired to connect with each other. Extended periods of social isolation can harm even the most resilient individuals. My reaction wasn’t something to be ashamed of; it was a perfectly natural response to a deceptively toxic work environment, meant to signal that it was time to take action toward positive change.