Paul Murray said this quote

The importance of humor is primarily to puncture fixed ideas—to make us step back and realize that our situation, whatever it may be, is, in the grand scheme of things, always contingent and arbitrary and ephemeral. And that helps us to deal with our emotions and to keep going. Holding on to one perspective, on the other hand, whether it takes the form of grief or anger or a particular political standpoint, is often destructive to us and to those around us