The problem with work is that we attribute self-worth to what we do.
Nothing wrong with gaining satisfaction from our jobs, however, when things do not go well in the office, we naturally blow up and are disagreeable to many around us.
Perhaps we should think of work as something that we are required to do, but not a reflection of who we are. Then we can put aside things that do not go well as things that we need to improve on, but not as a criticism to who we are as a person.