Learning to control your breathing through actively relaxing the diaphragm and intercostal muscles can allow you to quickly control heart rate. Inhales increase heart rate while exhales decrease it, making a breathing practice that emphasizes exhales helpful in reducing heart rate quickly.
This podcast discusses how inhales and exhales control heart rate and how the physiological sigh can help calm you down. It also talks about heart rate variability and how box breathing can help balance heart rate.
The relationship between breathing and heart rate is an absolutely lock step one where your heart rate follows your breathing. Your inhales increase your heart rate, your exhales decrease it. This is why exhaling can quickly help you take control of your heart rate if it is racing too much.