Sounds a lot like scuba diver's pulmonary edema, hard to breath thinking out of air. I am glad this had a good outcome.
I knew someone would go there There are a number of possibilities here from allergies, COPD or even the valve not being open all the way. Based on the limited info of the first aid and treatment I think IPE is unlikely.