There's nothing wrong with reassuring your child that they'll be okay when they're convinced they aren't going to pass math or worried about not making the team.
But you don't want your child to be dependent on you to counter their negative self-talk. And constantly saying, "Oh honey, you'll do just fine," doesn't teach them how to develop a healthier inner monologue.
It's important for kids to learn how to respond to self-doubt on their own. And they need to learn that they shouldn't believe everything they think.
When you catch them thinking exaggeratedly negative, teach your child to "argue the opposite." When they think, "I'm going to be the worst kid on the basketball team," ask them, "What's the evidence you might not be the worst?" Gathering the evidence can help them develop a more realistic, balanced outlook.