It's not working in a team exactly, but venturing out into your local community and rubbing elbows with like minds daily certainly helps with the boredom of being a dev who works alone at home.
I've been one for over a decade now... and I didn't know how bored and depressed I really was until I walked into a yoga studio earlier this year and began practicing daily.
I've even met a few other developers there to shoot the shit. Turns out there are a lot of people with a lot of time on their hands... usually because they're well off financially and working on their own things... that visit these kinds of places.