I look at productivity more as a life goal. I can have WORK productivity and PERSONAL productivity. You may have a project that's due in two weeks, but you also want to read a book or watch a movie. I believe that getting any of these done is productivity, though one is productivity for work, the other is productivity for self. Once I think of it that way, it ceases to be a productivity questions. It's all about balance. While not the same as your situation, I've got a wonderful situation where my work and my hobbies are pretty much the same. It's just a matter of working on someone else's project and getting paid or working on my project and spending that money. I keep two sets of to-do lists, one for me, one for my business/clients. I find myself needing to morph my productivity requirements on the fly a LOT.
I've run into situations, similar to what you describe, where I need to get something done for a client, but REALLY would rather be doing something else, in this case, the same tasks but on MY projects. For me, the reward for completing a client task is to do a task on my personal project list. Now, depending where I am in the month for billables and deadlines, I may take a half-day to do my own thing. Or I may not work on my own thing for three days because I've got client deadlines. You'd be amazed how questions about paying the bills and buying groceries can make client projects float the the top of the "most desirable task" lists. :)
There are two keys for me: keeping an accurate to-do list so I can find my status at any moment in time. The second key balance and moderation. If I feel "unbalanced" in personal vs. paid work, I try to correct that by looking at my status(es) and seeing what can be moved around. As a freelancer, it's a little easier to prioritize on the fly than if I was working in a more traditional setting.
Basically, you'll know when there's imbalance by listening to your inner voice. There are times during the day where I'll take a break to surf websites, and after about ten or fifteen minutes, "Yeah, I should really get back to work." The key is to LISTEN to that voice and heed it. You'll soon find that balancing your work productivity from you personal productivity comes second nature.