First of all: the official deadline is never my deadline. Whatever timeframe I agree to, I make sure my own personal deadline is earlier. You have to use a little discipline to make this work, but a buffer is a really, really nice thing to have (and has saved my skin more than once!)
Perhaps more important than buffers are milestones. I break all my work up into milestones. Instead of aiming for the final deadline for, say, a full review of my manuscript, I break the work into steps: go through the first six chapters of edits by Wednesday, finish the rest by Friday.
If I can tell by Tuesday that I’m going to fall short of my target, I can adjust. I can opt to move through the text faster and not as painstakingly to stay on schedule. And because of my shadow deadline, I’m still ahead of the game.
Working with milestones is also a great way to sustain motivation throughout your project. A deadline of a whole week means you still have room on Tuesday to think: I’ll do it tomorrow. But milestones within that week ensure you pace yourself, and pacing yourself can make your work better.