Humor is a means of obtaining pleasure in spite of the distressing effects that interface with it.
or simply: