I'm not sure if this is a common trope, but I remember an instance of it from the show According to Jim.
Two women (sisters Cheryl and Dana) were talking to each other in a parking lot and were preparing to leave, when a thief suddenly tries to steal Cheryl's purse. She runs after the guy and manages to tackle him and get her purse back. The thief runs away.
After Dana asked Cheryl if she's ok, they finally realize the danger they were just in and the shock finally hits them ("OMG!" "OMG!"). They calmly sit down in the car, look at each other, then slowly start laughing, presumably because of the absurdity of what happened. Then they start crying, probably realizing it could've gone much worse than it did. Then they laugh, then cry, etc...
Is there a name for this trope? Where a character just went through something traumatic, doesn't really realize how dangerous it was at first, then is unsure of whether to laugh or cry at what just happened and just switching back and forth?