Now, I'm assuming that Jo wants to hear about this in relation to being a writer, so that's what I'll focus on, though I also feel qualified to write about body self-doubts, intelligence self-doubts, likeability self-doubts, beauty self-doubts, friend-worthiness self-doubts, and general free-floating self-doubts. What makes writing particularly rife with self-doubts is that by its very nature writing is the practice of failure. You have your vision of whatever you're writing, and the actuality of what you're able to do with words, and rarely the twain shall meet. I could now go off on a pages-long meditation on the value of failure, but since Jo asked "what to do" I'm going to try to take a problem-solving approach. (By the way, this works for lots of issues, not just writing. Free therapy! You're welcome.)
For me, self-doubts tend to fall into one of three categories:
1. Irrational catastrophic predictions of things that haven't happened yet or things I can't control
2. Comparison disease
3. Rational, legitimate concerns that might actually have solutions
For the things in the first category, you need to learn how to be your own best friend. Imagine a close friend expressing the same anxieties and think about what you would say to him or her. Like, if a close friend said, "This book is stretching the limits of my abilities right now. I'm probably never going to finish it. I should give back my advance, change my name, and move to Wyoming before everyone finds out what a loser I am," you would not respond, "Yeah, good plan, I was gonna say." Or if a friend said, "I'm really disappointed in the performance of my book and it's not on any lists and it has an Amazon ranking of 3,987,233, therefore I'm a waste of space and will never write again," you wouldn't hand your friend an application for Wendy's and say, "Good luck in your new career." Try to show yourself at least the decency and compassion and wisdom that you'd show a friend. This may involve a lot of talking to yourself, but that's okay.
The second category is tough, and it's something we all have to deal with from grade school to our death beds. For you writers who haven't been published yet, you'd think that being published would solve this problem, wouldn't you? HA! In fact, being published opens up new vistas of insecurity, the likes of which you would not have dreamed possible. You find yourself comparing minuscule contract differences, perceived publisher support, the number of blog comments you get relative to another writer, tallying up the number of speaking engagements they get when you don't even like speaking engagements. You'll envy writers for getting awards you're not even eligible for, sales numbers you know wouldn't make sense in your genre, the parties they get invited to that you don't---even though you live 1500 miles away. There is no permanent solution for this problem. The best I can tell you is to figure out what pushes your buttons, and avoid those things. If a certain industry newsletter gives you the bends every time you see it in your inbox, unsubscribe. If a certain writer's blog always leaves you feeling irrevocably inadequate, stop reading it. (Secret: you are not required to read the blogs of everyone you ever meet. You aren't even required to read the blogs of good friends.) If Google alerts make you question your very existence, stop getting them. Admit that you are weak and avoid your weaknesses.
By now, the third category will come as a relief! Some of the things we have anxiety about are totally legit, and involve real problems we can work on solving. If you know you should be working harder, build some structure and discipline into your day. If you wish your books had more commercial appeal, or more literary appeal, read mentor texts (books by authors that do that really well) and take notes. If you're anxious because you realize you don't know much about the business, go to a conference and find out. If you feel like your book can and should be better supported by your publisher, brainstorm with your agent or editor about how that might happen. Focus on what you can control.
That's all I have, I think. Thanks, Jo, for the topic suggestion, I hope all this helps!