Hoo, boy. This is a huge topic. I don't think put downs -- of oneself or others -- are funny.
What is funny? Terry Pratchett is funny. Other than TP, disjunctions, incongruities and surprises are funny. The following is funny:
When the enemies of Gunnar of Hlidarend went after him, they snuck up on his house after dark. One man was sent ahead to find out if Gunnar was home, and Gunnar put a spear through the guy. He staggered back to where the rest of the party was. They could hear him, but couldn't see him clearly.
"Well," asked one. "Is Gunner home?"
"You will have to find that out for yourself," the scout said. "But I can tell you this much. His spear was home." And then he fell dead.
This is a 13th century Icelandic joke, and it is a laugh riot.
What's funny about it? Mostly the utter coolness of making a joke like this while you are dying. I mean, most of us would reply, "Shriek! Moan! Effing A he's home. I'm dying! I'm dying!" Thud.