When something’s got you laughing at the most inopportune times, turn to Wiki How to learn how to stop.
The advice is humorous, and might work in some situations, but it’s a fun read regardless. I like number 8:
“If it gets really bad, hold your nose and cover your mouth with that hand. Then people can’t see your grin, and you can laugh as hard as you wish inside yourself. You may start shaking, that’s good, it can be covered as crying. Try not to let any sound out, but if you do ease up by accident it sounds much like a sneeze or a strange snort.”