Why having friends at work will make you a better employee

The 3 unusual questions a Google exec likes to ask employees

If you don't like the people you work with, odds are you also don't like your job. Sometimes, that's out of your control, but if your other coworkers are getting along, what's keeping you from making a friend or two?

Managing to be happy at your job is not only good for your company's bottom line, but you also become a more engaged worker, according to Gallup's 2017 "State of the American Workplace" report. One way to boost your happiness at work is to form friendships with your coworkers.

"When we feel cared for — even loved, as one does in a friendship — and when we belong to a group that matters to us, we are generous with our time and talents because we're committed to people, not just the job or company," Annie McKee writes in her upcoming book "How to Be Happy at Work: The Power of Purpose, Hope, and Friendship."

Overcome your greatest fears by using Tim Ferriss' fear setting exercise

"We should be seeking to build loving, friendly relationships with our coworkers, not running away from them as we too often do," McKee writes.

As a leadership advisor for Fortune 500 companies and governments across the world, McKee studies the impact of happiness on an individual, team and organizational level.

Understandably, forming workplace friendships can seem intimidating. Instead of reaching out to people who care about us, we "go back to our desks and hide out because we are stressed or overwhelmed," McKee notes.

The most common excuses McKee has heard against making work friends include, "I might get in trouble," "I've got to keep distance or I won't be able to have the tough conversations," and "You've got to have clear boundaries."

Emotions can be good for business, if you use them this way: Tracy Anderson

"Connecting with people boosts our mood and our morale, and friendships provide us with the emotional and psychological strength to deal with whatever comes our way — whether an exciting opportunity, a challenge or a crisis," McKee writes.

If you're not sure how to start those workplace friendships, McKee recommends building a foundation based on three things: trust, generosity and fun.

A few ways to build trust include keeping your word and promises and giving or sharing credit when it's due. To establish generosity, make others feel appreciated with a more compliments and "thank yous," she writes. Lastly, having fun with your coworkers can start with being lighthearted about work.

This is the top lesson from Bill Gates and Warren Buffett's favorite business book

"Check yourself when you get into that hard-driving task mode that we all know so well," McKee writes. "If you spend the majority of your time head down, frowning and intense, people will stay away."

Consider this: Most people in their 20s and 30s are already spending most of their time with their coworkers, so why not make the most of it?

Don't miss:
This Harvard Business School grad sold his business for $100 million to pursue his dream job
How Elon Musk's mother inspired a family of entrepreneurs

Like this story? Like CNBC Make It on Facebook.

When Elon Musk had an existential crisis at age 14, he read this book