Researchers at the University of Nebraska Lincoln did an experiment with hundreds of people working in a wide range of jobs.
They asked the subjects to describe an imaginary co-worker. It was important to the researchers to have subjects focus on imagined coworkers because the emphasis was on not on how they perceived the people they worked with, but on the subjects' perceptual biases.
The researchers found that those who described imaginary coworkers as productive and able to handle challenges and rebound from mistakes were typically themselves happier and more productive at work.
It's possible that conjuring a more positive mind set can improve your overall well being, including being happy at work. And perhaps imagining someone else with the qualities you admire is one way to develop them in yourself.
"Imagine that: How you envision others says a lot about you in real life." EurkeAlert! University of Nebraska Lincoln. January 12, 2012. Re-accessed for September 2018 re-reun on August 20, 2018.