Perhaps if you'd explain why this would be a great thing for the game? Don't make the mistake of thinking Dwarf Fortress is intended as some sort of "real-life" simulator.
The purpose is to simulate a world which can produce emergent stories of the kind found in typical fantasy literature. Death by laughter not being one of the more common tropes.
In fantasy stories causes of death vary heavily.
In order to ensure that death by laughter is going to be a rare cause in Dwarf Fortress I believe that upon beginning to laugh there should be a chance per few ticks to continue doing so. Said chance is determined by humor, cherrfulness and emotional obsession personalities. The better is the quality of jokes cracked by various characters the longer they may laugh as well. Laughting long enough may cause characters to be winded (light blue lungs) or suffer from heart issues (they become light blue on health screen). Prolonged status effects like that can lead to death. Laughter can cause jobs to be cancelled but most people upon suffering from it enough may become mad on somebody who is interrupting them with jokes and quit laughting entirely or not quite so. Most laughter can be easily overrided with situations being grave serious. Most will also simply stop once they begin to feel internal suffering.
I do also believe that comedy could be used to actually save lifes. Characters close to or already suffering from melancholy while they could actually hate someone for cracking jokes they could actally feel greatly relief if said joke or funny situation they witness were extremelly joyful.