I haven’t seen the movie Joker (2019) ... yet ... but I have observed what is often referred to as nervous laughter occurring with many people, including those involved in the controversial Milgram Experiment (Milgram, 1963) as you can see in this YouTube video at 5 mins 40 secs for example.
There isn’t necessarily any psychological disorder which will cause nervous laughter, but it is a physical reaction to stress, tension, confusion, or anxiety.
Neuroscientist Vilayanur S. Ramachandran states (Ramachandran, 2004):
We have nervous laughter because we want to make ourselves think what horrible thing we encountered isn't really as horrible as it appears, something we want to believe.
and also suggests that laughter is used as a defense mechanism used to guard against overwhelming anxiety. Laughter often diminishes the suffering associated with a traumatic event.
Psychologist and neuroscientist Robert Provine, from the University of Maryland, studied over 1,200 "laughter episodes" and determined that more than 80% of laughter isn't a response to anything he described as “resembling a formal effort at humour” (Provine, 1996).
References
Milgram, S. (1963). Behavioral study of obedience. Journal of Abnormal and Social Psychology, 67(4), 371-378. doi: 10.1037/h0040525 Free PDF: https://pdfs.semanticscholar.org/29e4/8c1365346fc67137423a016096622ac6a215.pdf
Provine, R. R. (1996). Laughter. American Scientist, 84(1), 38-47. Retrieved from: https://www.webcitation.org/67VExLQDj
Ramachandran, V. S. (2004). A brief tour of human consciousness: From impostor poodles to purple numbers. New York, NY: Pi Press.