Upper UTIs are infections of the kidneys. These are potentially life threatening, if bacteria move from the infected kidney into the blood. This condition is called sepsis. Sepsis can cause dangerously low blood pressures, shock, and death.
So whe you hold your breath, you stop getting oxygen in your lungs that go to your heart. The oxygen level in the blood drops, so your muscles need more oxygen, so the heart pumps faster. This is like running, your muscles need more oxygen so heart pumps faster
When the patient gasps, there is a negative pressure in the chest, which not only sucks air into the lungs but also draws blood to refill the heart. In contrast, mouth-to-mouth breathing creates overpressure in the chest and actually inhibits blood flow back to the heart. Gasping during cardiac arrest is much.