You can improve your performance if you let your mind control your heart and Lungs!
The ability to relax helps us cope more effectively with really tough situations in competition. Instead of focusing on how bad you feel you just need to relax and focus on our breathing. Do this and you'll have a better chance of continuing the competition at the pace you desire.
Scientific studies support the idea that mental strategies can improve exercise capacity. This means that it is in your MIND! Try this ... Close your eyes and take 10 deep breaths as slow and deep as possible while feeling only your lungs expand and contract, nothing else. Do you feel relaxed? Well you can perform a similar version of this during competition. The next time you feel yourself "Hyperventilating" during a competition, focus on your lungs taking in as much air as possible. You will slow your heart rate down to a more manageable pace.