Much like most people, I've faced multiple instances where there was nothing keeping me at a job, but bills and responsibilities meant quitting wasn't an option either. In such cases, it's difficult to show up, let alone do your work to your best ability. But a few strategies have helped.
Stop Blaming Yourself, But Take Responsibility
Motivation is intrinsic. While external factors affect it, your reaction to those factors is what ultimately leaves you demotivated. But there's a difference between taking responsibility for this and blaming yourself for this—and far too often, we do the latter.
Via The Learning Factor
Sometimes, you get to a point at work where your motivation is completely depleted. But circumstances dictate that you can't quit. So how do you keep going? There's always a way.
Life has so much more to offer beyond the expected pitfalls that one will always come accross in life! In many cases we think we are the mistakes that we make. In reality we are more than the mistakes we make. Motivation depends on our attitude towards life and the challenges it poses before us.