Oh goodness this brings back memories. My boss had me sitting outside the men's loo and I spent a lot of time gagging from that!

Breathing through the mouth worked for me, or breathing through a hanky. Or staying outside in the fresh air.