Updated

It is so easy to arrive home from work in a bad mood, cranky and frustrated.

Our grandfathers’ generation found a solution in a dry martini. Today, it falls to psychology to help us transition happily from work to home. Psychologists call it “boundary work”—devising routines and rituals that create mental space between the day’s frustrations and the evening’s rewards.

The routine could be hitting the gym or something as simple as running errands or stopping for an espresso. “It’s all about what makes you happy,” says Cali Williams Yost, a consultant on flexible workplaces and author of “Tweak It,” a book about making small changes to improve well-being.

To leave behind his work caring for children with complicated medical needs, Gregory Kraus, a New York City pediatrician, says, “I’m embarrassed to say that I watch celebrity gossip apps on my phone.”

After the stress of working, preparing dinner and putting his 4-year-old daughter to bed, Dr. Kraus says browsing through images of celebrities’ seemingly carefree lives brings his blood pressure down.

Click for more from The Wall Street Journal.