Thirty years ago, a lady my husband worked with at a marina in Southern Maryland, told him a secret to avoid crying while chopping onions: Keep your mouth closed. Breathe through your nose. Do not talk. Do not open your mouth.
The trick is to remember this before you start chopping the onion!
But, it does work.