This is a British Theatrical Slang for unintentional laughing by an actor in the scene when he / she is actually intended to play the role without laughing. So, this is spoil a piece of acting by forgetting one’s lines or laughing uncontrollably. It is so-called because the worst time to have the giggles is when one is playing a corpse.
Famous actor Peter Sellers (Pink Panther fame). is normally known for breaking the character (a theatrical term used to describe when an actor, while actively performing in character, slips out of character and behaves as his or her actual self) which resulted in corpsing of his co-actors.
Once scene is attached from the movie The return of Pink Panther, where in actress Catherine Schell can be seen corpsing at the performance of Peter Sellers.
One singer ad libbed and corpsed his colleagues on stage
Majority of the actors can’t help but corpsing witnessing the antics of Peter Sellers on the stage.