Anyone who’s ever worked in an office can tell you that liking your cubicle-mates can make going to work a significantly more enjoyable experience, but new research says identifying with and feeling a strong connection to the people you work with has actually been shown to improve your overall health and sense of well-being. According to an international meta-analysis of 58 studies involving more than 19,000 people published in the academic journal Personality and Social Psychology Review, feeling like you and your colleagues are on the same team, and, maybe more importantly, feeling like your colleagues feel the same way, isn’t just good for workplace productivity, it’s good for workers’ mental and physiological states, too.

Niklas Steffens, the analysis’s University of Queensland-based lead researcher, says his team’s key findings suggest that when people are particularly invested in their social relationships at work, there’s more evidence of health benefits and lower levels of burnout.

“When we identify with our workgroup and organization, this provides us with a sense of ‘we-ness’— which is a basis for a sense of belonging, agency and social support, and a sense of meaning and purpose,” Steffens told mental_floss in an email.

To make their conclusions, Steffens and his team (which included researchers from China, Germany, and Norway as well as Australia) carefully reviewed dozens of previous studies from the past two decades that examined the relationship between group social identification and health within organizations. Overall, the team found that workplaces that allow workers to feel “at home” and that facilitate lower-level workgroups that employees can identify with socially are the most likely to create a workforce that feels invigorated instead of burned out. This kind of staff in turn tends to be more successful and satisfied with their work, and less likely to experience physical symptoms like back problems or poor cortisol levels. The sharing aspect, or knowing that fellow colleagues also feel the same sense of office unity, is particularly important, the research showed.

Surprisingly, the analysis found that these benefits tend to be stronger when more of the participants in the studies were men, a counterintuitive piece of information considering women tend to have stronger social networks. Steffens and his team hypothesized that this might be because many workplaces are still stereotypically masculine, leaving women to feel left out of the organization’s inner circle.

Another area the study points out may need more examination is how much of an impact it can have when an employee actively distances him or herself from an office social group. “It is conceivable,” the study says, “that increasing levels of disidentification … are more strongly related to the presence of unease, discomfort, and stress than to the absence of ease, comfort, and well-being.”

Josselyne Herman Saccio, a communication expert who was not involved in the study, but who leads seminars for personal and professional growth firm Landmark, says that feeling of “we-ness” among office social groups can also feed a poor mental state if those groups indulge in negative behaviors like complaining and gossip.

“When you’re in complaint mode at work and other people agree with you, you end up getting stuck,” Saccio said. The beefs you have seem more real, she said, when others you identify with reinforce them. This can lead to bad feelings, poor work performance, and burnout as you internalize each complaint. Instead, Saccio recommends reframing complaints in the form of requests so things actually get done and channeling that social connection with colleagues through a more positive filter. Talking with work friends about the aspects of your job or organization that originally attracted you to it can shift those mentalities.

“You might end up reigniting other people’s passions,” she says.

From a hiring manager’s point of view, deciding that a candidate is the right fit for your workforce social culture should be a matter of whether that person is one the other workers can identify with, Steffens said. (The same can be said of a prospective employee trying to gauge whether he will fit in with a new company.) Based on his team’s research, Steffens said that a shared social bond is a crucial factor in someone’s overall sense of satisfaction and contentment.

“Hiring managers may want to look out for individuals who are likely to actively undermine a sense of unity in a team or organization and to jeopardize other members’ social identification with the workplace,” Steffens said. “Moreover, managers may also want to look out for individuals who are likely to place their own personal interests above the interests of other members of the team and the organization that they will be part of. Instead, hiring managers may want to seek individuals who are likely to be able and willing to contribute to a meaningful and healthy group life at work.”

All in all, feeling a sense of belonging with the people you work with matters. So maybe think about that the next time you’re deciding whether to attend that office happy hour.