Laughing while in pain helps some people feel better since laughter is known to be the best medicine.
Whenever I get hurt and feel pain I also start laughing and it makes me feel better and takes my mind off the pain when I laugh.
Laughter also releases feel-good chemicals called endorphins, which can also act as painkillers to help with the pain and it does seem to work for me.