I use humor for many purposes, but as a shield, specifically? Yes.
When you make a joke of something that isn't easy to reckon with, you end up never having to own those things.
Painful memories? Regrets? Current and future problems? I make jokes about them, and take on a cavalier attitude. People think I'm not taking things seriously, but I am. I'm just using humor to keep from having to own the emotional baggage that comes with those things. I still deal with them any which way, but in that way, humor is my shield.
Fo' instance: I sing the "credit card debt" jingle from Family Guy when I think about the crushing debt I'm currently battling. It's either that and I laugh and proceed forward with the situation normally, or I worry as much about it as society says I should and end up with rolling panic attacks and complete paralysis for dealing with the situation. So in that way, I guess you could say humor is both my sword and my shield.
***
Just because I made kind of an esoteric reference, here's the "credit card debt" jingle:
Although my lawyer would want me to say that none of the words in that video nor the song are my own, when I sing them I do so purely for entertainment purposes, and I have every intention of paying back my $30,000 in credit card debt.