For up and coming juniors I personally think it is one of the most underestimated and underutilised facets of developing your game. You wouldn't wait to grow out of a bad ball toss for example, you'd work on it with a coach, and the same goes for developing mental toughness.
Very few kids are born with a natural killer instinct and ability to control their emotions and behaviour on court. Pretty much everyone has to work on it, a lot.
Even if you don't go down the professional path for now, there are plenty of things you can try to see what works. One my son uses if he's getting frustrated is he taps the ball to his head to transfer all his bad thoughts to it before serving them to his opponent. Or bouncing on your feet if you're feeling negative. Another thing is to ignore the match and take it one point at a time, filling your head with useful and positive thoughts like consciously focussing on trying to pick your opponent's serve, seeing how well they can pick your serve or just watch them for "tells". The more time you spend thinking about your opponent, tactics, etc the less headspace there is for negative thoughts about yourself. Who knows he or she could be just as nervous and worried about their game as you are!
Or if you're stubborn like me, say to yourself you won't give your opponent the satisfaction of seeing you get angry. Tell yourself when the match is over you'll allow yourself to indulge in releasing that anger by kicking a wall, screaming out loud, etc. If they belt a hard to get winner, don't think "how can I beat that?" but "that's your one lucky shot, try it again". If you go into a tiebreak, tell yourself I am going to win this and make a statement of your intent as early as possible. If you're going to lose, lose on your terms, not on theirs. Google is your friend and try what you can until you find something that works.
I've worked with my son a lot on mental discipline to the point where he recently went to a national teams championship, with everyone he played ranked well above him. He beat plenty of players ranked 20-40 in the country for his age (he's always been just inside the top 100), took a lot of games off those ranked 10-20, won 3 of his 4 match tiebreaks and came back from 7-5 5-1 40-0 down to win another match. He just doesn't give up and will always back himself, finding a way to put pressure on the other player. And this is a kid who just over a year ago was smashing racquets and thinking he'd never be able to hold it together on court long enough to play his best tennis.