When this happens to you, does it feel like someone is reaching into your chest and squeezing your heart for a second or two? Do you feel a bit of tightness in your throat and are short of breath for a second? When it stops, does it feel like cold water just went rushing through your chest?
If yes, there may be some issues with your AV node in your heart. The AV node is the electrical distributor in your heart, and it controls the timing of the two ventricles and two atrials, as to when they contract. If the node does not keep the timing correct, it will be pumping air through the heart instead of blood.
I had WPW since I was born so I know a bit about the electrical workings of the heart. I had to have surgery to correct my problem, but if you are experiencing this on a regular recurring basis you may need something along the lines of a pacemaker. But I think the current tech is more like a small shock device to hit the reset button on the AV node to get the timing back to normal.
Before my surgery, and before doctors really knew anything about the electrical problems of the heart, when my heart would go off the procedure to get it back under control was to get in a sitting position and bear down like you were trying to use the toilet. Yeah, it sounds silly now but it did work about half of the time. The backup plan was to fill the sink with cold water and ice and dive in face first. The shock of the potential of drowning was said to reset quite a few of the body's functions.