It turns out happiness takes lot of work. Having a healthy social life takes a lot of trying, failing, and some successes that you cherish.
Some people tragically take their co-workers as their friends and the office as their social environment. That's really dangerous. You need to go out there and try, be awkward, fight to make some close friends in the real world. Office drama and venting over a beer after work is not a social life. Also the office is not a dating pool. Being depressed that your office doesn't have any cute girls or boys... oh boy, I've seen it!
Isolation and depression is due to lacking social skill and not having the drive or insight to develop that skill.
Remote work is hardly related. It's related only because people take the office as their social scene and of course when they go remote they lost their entire social scene.