What emotions are you feeling while writing? Frustration, anxiety, doubt, even anger might be present. On the positive side of the ledger, pride and satisfaction, excitement, anticipation. I believe the techniques of cognitive therapy can be useful in looking at how to get the writing done, because a lot of the obstacles take the form of cognitive distortions. One thing you can do is to monitor your emotional states, give them names.
I don't recommend trying to eliminate negative emotions, because I think without them you aren't doing it right. In other words, if you are not concerned about how the project is going to turn out, if you don't have a stake in what you're writing, why do it? If it's super easy and pain free, you probably aren't challenging yourself enough. Realistically, you are going to feel some bad things while writing from time to time. What I recommend, instead, is acknowledging that writing can be painful and keeping some kind of equilibrium. If emotion is the reason why you're not writing, then you have to tackle the problem emotionally.