For me, motivation comes in the ability to draw a line between work and home. I really try VERY hard not to bring my home life to work, and vice versa, keeping all the baggage at the doors allows each place to be it's own home. For better or worse.
When things are bad at work, for instance, I remember previous jobs that were so much worse. At my current job I am no longer tied to a desk for 8 hours while people tell me I should get up and move - but also don't walk away or move from the keyboard. Now I get to walk 3-6 miles a day, and that feeling of freedom has largely not worn off which feeds my motivation to keep that freedom.
When things are bad at home, such as my A/C breaking and vet bills, it isn't my coworkers faults. They don't know, they don't care, and they can't help. Taking out any frustration on them is not going to do any good and will possibly harm work relationships and harm my job. That wouldn't do anyone any good. On the same token, a rough day at work has no bearing on my family so they shouldn't get any sort of brunt from my bad day.
Keeping these separate worlds allows me to deal with each one in a compartmental way, allowing me to have individual motivations for each aspect and also allowing me to have neither become demotivation for the other.