>like suppose you are struggling to recover from alcoholism. you might want to confide in your close friends. you might not want to share this with friends from work. you almost certainly should not share this with your boss, even if you consider them a friend.
I would absolutely share this with my "work friends" and even my current boss. When one of my previous bosses shared with me that he was having trouble at home with his spouse, it wasn't like he suddenly became a bad boss. If anything, it helped our work because it gave me the opportunity to be more understanding when he seemed more worn out or needed to leave early for the day to go spend time with his family. If he had told me he was struggling with drinking, then I would know that maybe we should go play sports rather than to our weekly happy hour. We build each other up, both inside and outside of work, because that's what friends do, and it has the nice side effect of making our professional careers better, too.
Perhaps I just have had a lucky stream of working on unicorn teams, but I would hate to work at a company where I couldn't share details of my life with the people that I spend 40-60+ hours a week with. Obviously every workplace and relationship is unique and you aren't going to share everything with everybody (I'd share the above details with my current boss but by no means with all of my bosses), but I don't understand this attitude that you shouldn't share anything with anyone that happens to have a common employer.
To me, work is just another facet of our relationship alongside the many other facets, no different than if we had met through volunteering or went to the same gym. I don't share everything with every coworker, just like I don't share everything with every other person that visits my gym. But I also don't shy away from sharing things with someone just because they are my coworker, just like I wouldn't shy away from sharing things with someone just because they also use the same weight set that I do.