1. When you're having trouble doing something, the solution is not to focus on your inability to do it and deprive yourself of all joys until it's done. Instead,
(a) change the form of the problem (e.g. turning 'write a good draft' into 'write a horrible draft, then purge the dross later'), or
(b) recruit resources that make it easier (e.g. discussing job applications with a friend instead of trying to do it alone), or
(c) improve your general mental state until you have more capacity to deal with the problem (e.g. aiming to clean room after getting back from doing something fun rather than after staying in your room all day).
2. When you’re having trouble not doing something, the solution is not to obsess over every slip and and conjure up ever-more-dire consequences for doing it. Instead,
(a) identify the desire that is being satisfied by the wayward action, and what you can do to more usefully fulfill it,
(b) change something about the circumstances in which you do the thing so that you have a fresher start, and
(c) focus on your freedom of choice, and the pleasurable consequences of the decision not to do the thing, rather than a feeling of failure and obligation.