But I wanted to follow up with a short message: self-doubt does not go away. Self-doubt is there when you get an agent. Self-doubt is there when you sell a book (or even two). Self-doubt is there when you get both good and bad reviews. And self-doubt finds you late at night, when you think you've put it to bed for the day.
The best thing you can do as a writer is to establish coping mechanisms to deal with doubts. And, as you publish, to deal with external forces that create more doubt: like individuals who tag you in a negative review about your book or books.
In the post from Class of 2k20 Books, we suggested trusting the writing process, being true to your own story and your own path (and not comparing yours to others), and having a great support system. These are essential big idea coping mechanisms. Some other smaller, harder ones?
Not reading reviews, unless your agent or editor sends them to you.
Disconnecting for Twitter or other social media for 24-48 hours each week.
Not discussing deals or reviews with writer friends, but instead talking craft.
Going into nature and screaming to the trees, then maybe hugging one.
I want to make one more suggestion: revisit your love for writing.
That may mean putting off the review you're writing on deadline, or spending the first half hour of your revision session writing for a shiny, new project or writing poems in a journal. Remind yourself that--even if you came to writing because you're an egomaniac who needed to see their name on the cover of a book--what kept you going was likely love of the craft of writing. So, find the love. Find the joy. Write because it pleases you to do so. And try to let the rest go for as long as you can.