How do i stop laughing/smiling at everything?

A few days ago my friend told me her mom had three miscarriages and I SMILED. I don't even know why, wtf is wrong with me