Break down your goals into daily or hourly milestones. If you feel stressed or like you don't have enough time to write, that's going to knock your confidence, and it will be hard to write. I like to set goals for how many words I have to write each day, and I base it on when my deadline is. I also underestimate that goal, so if I write more than my goal, it boosts my confidence. However, some people feel less confident if they have a deadline, so you have to find what works for you.