Create a script file, put it in the mission directory and name it onPlayerKilled.sqs. It will play automatically when the player is killed. It is advisable to use the original file of this name as the template: can't remember where it is, I think it's wrapped up in a .pbo called scripts somewhere. Explore the Flashpoint directory, it's not hard to find.
No idea if this will work in MP though.