There's a lot of psychology involved in writing. Like so much else, it's a confidence game, maybe even a confidence trick. You write your ideas down in the hope that someone else will give up their precious time to read it: it suggests that you believe you have something to say worth saying. Trust me when I say that such certainties rarely last much beyond chapter two. The important thing to recognise is that your feelings about your work have absolutely no relationship to its quality: the struggle to write a good book and the struggle to feel all right about the book are two entirely separate challenges.
Feeling bad about your work is entirely normal.
When I speak to other writers I'd say there is a broad consensus about the four stages of graft:
Stage One: You are about to write a book. This is the best moment because you haven't screwed it up yet. Many writers secretly experience Donald Trump levels of confidence and euphoria. 'I'm going to write a book and it's going to be the best book ever! I have the greatest idea and it's going to make me rich and famous.' You think it will be a classic - taught in schools - the whole major literary contribution thing. You plan your interview with Mariella Frostrup and wonder what you should wear for the Oscars - when it's turned into the major motion picture of the year. You wonder if Kristin Stewart might be persuaded to star or if she's getting a bit old. Hold onto this feeling because you need the memory of it to keep you going.
Stage Two: You have begun the book. Excitement and optimism. 'You know I've always wanted to do this and it just feels so good to get on with it at last and I'm just so full of ideas! It's not perfect but I can fix it in edit, but you know, it's great it's going really, really well.'
Stage Three: You are at the end of the beginning of the book and nowhere near the beginning of the end. 'The book is a disaster. I've lost the plot and it's not that good and the writing is a bit clunky and, do you know what? Someone else has just published something just like it. And I heard on the radio that people are only reading stories with psychopathic unicorns and I haven't got a unicorn or a psychopath in this. And I'm wondering if there's any point. It seems just a bit stupid. If I gave up writing it I'd have so much more time for my partner/kids/career/knitting/ relationship with Netflix. I'm not sure it's such a strong concept.'
Stage Four: You are at the End of the Book 'Yay! I did it. I don't care anymore it's just over but, you know, it's not half bad. It needs tightening, obviously, and some of the wording is meh. It's maybe slightly derivative, but that's good, isn't it these days? Publishers like something a bit like the thing that has just been a big success.' You start tentatively wondering if maybe that new up and coming star - Florence Pugh? might be a better lead...