When you're under pressure, thinking of yourself in the 3rd person can help you cope according to a recent study published in Scientific Reports.
Instead of thinking, "How can I possibly get this done!?", think, "How can [your name] possibly get this done?" The "I" mode tends to push you in the direction of your emotions, which in this case probably are negative; creating a bit of distance by changing the reference to your name tends to push you in the direction of possible solutions.
If that's still too close, try imagining that a friend of yours has exactly the same issue with the same circumstances. What would you advise him or her to do?
You may find that if you imagine the problem as belonging to a friend you are much less judgmental than when you think of it as being yours. If so, it's time to be as kind to yourself as you are to your friends.
Need some constructive guidance in writing your book or script? Check out my book, Your Writing Coach, published by Nicholas Brealey/Hachette, and available from Amazon or your other favorite bookseller.