In his controversial article, "Why women aren't funny", Christopher Hitchens quotes Nietzsche as saying, "A witticism is an epitaph on the death of a feeling". Regardless of the rest of the article, I think this definition of humor resonates with me more than any other. (It's interesting to note that Nietzsche was notoriously depressed.)
Humor attracts depressed people to the relatively large extent it does for it's capacity to be used as a defense mechanism. Most depressed people, as I've mentioned before, see the world in a competitive, zero-sum-game hue. Nietzsche's depression sheds light on his own philosophy and outlook on life, his "weltanschauung", as it's known. He is famous for saying:
"What is good? Everything that heightens the feeling of power in man, the will to power, power itself.
What is bad? Everything that is born of weakness."
His philosophically original ideas on necessary self-loathing, Nihilism, Man and Ubermensch, etc., all point to his general self-centered, competitive outlook on life.
But coming back to the original point, humor allows us to pretend to be superior to, or at the very least, capable of dealing with, an adversarial experience, situation, or person. By making fun of this thing that dominates and/or scares us, or hearing it being made fun of, we can focus on it's shortcomings and take away some or all of the fear, if just for the moment. Comedy not followed by an action to stand up to the adversary however, is, of course, empty. Joking among friends, therefore, is especially important in this context because we get to show them that we are unaffected by whatever thing we truly fear. This outside approval can help bolster the case for the fraud we are committing in our minds, the main objective of which, i.e. the removal of the adversary or the fear-based stress, was never really achieved (i.e. the denial does not rid us of the fear, contrary to our demonstrations to the opposite).
That's what Nietzche means. Reducing a serious subject (like the feeling of inadequacy at something) into a witticism allows us to deny the uncomfortable feelings it brings up by finding something about it to laugh at, since we feel unequipped to really deal with it. Unfortunately, acting in this denial state never allows us to deal with the feeling rationally.
This is similar to using coarse language to put on a show of bravado and uncaring to something we feel unable to deal with. Phrases like, "Making love: What my girlfriend does while I fuck her", pretend to deny feeling a basic human need by ridiculing it. It is therefore, a priori, stupid. Denying and repressing a part of ourselves, though, leaves us feeling stifled, stressed, and ultimately, depressed underneath. And like all defense mechanisms, it is unhealthy and unhelpful whatever form it takes. I hope you're not waiting for me to end with a joke now.