Recognize some self-doubt is normal. Alberto Salazar, three-time winner of the New York City marathon, once said, "I had as many doubts as anyone else. Standing on the starting line, we're all cowards." So, yes, even elite runners struggle with these feelings of anxiety before races. A healthy amount of fear can actually be beneficial because it helps you stay motivated to continue with your training and run a smart race. Get a little too over-confident and you might slack off a little in your training or start out way too fast in your race.
Try self-talk. Postive thinking is very powerful. When you start thinking negative thoughts, give yourself a little pep talk. You don't have to be that crazy person talking out loud to herself on the treadmill. Just develop some positive thoughts or a mantra that you run through your head. Remind yourself how hard you've been training, that you're strong, you're fit, and prepared to run to your potential. After some repetition, your positive attitude will become more automatic.
Be prepared. You might be worried about things you can't control, like the weather on race day. Take charge of the things that you can control. Figure out your race outfit, get familiar with the course, practice eating before your runs, and hydrating on the run. Having those factors under control will make you feel better about some of the unknowns.