Breathing is one of the few ways to directly influence your stress response. Slower breathing with a longer exhale is widely used to bring arousal down before competition.
Approaches commonly used:
Slow breathing at around 5-6 breaths per minute for a few minutes
A longer exhale than inhale, for example inhale for 4 counts, exhale for 6
Box breathing: inhale, hold, exhale, hold, each for about 4 counts
Short versions, such as one or two slow breaths before a serve or free throw, as part of a routine
Practise it when calm first. A breathing technique learned for the first time on the start line rarely works well. A couple of minutes a day in training makes it familiar enough to use under pressure.
If slow breathing makes you feel light-headed, shorten the holds and make the breaths less deep.
Not everyone needs to calm down. Some athletes perform best with higher arousal, and before explosive events a few faster, more energising breaths may suit them better.
The skill is knowing your own best state and using breathing to move towards it, up or down.