This happened to me a lot of times. Depending on the situation, but my best bet was to chug down a redbull and ride my bike home for oxygen relief. Lots of times the redbull or the bike ride alone stopped the attack.
It helps if you have an understanding supervisor and live close to home. Otherwise Imitrex injections.