I laughed at your joke, so don't spank yourself so much.
In any case, though shame is a public experience that is impossed on you by some collective, I think that it is possible to avoid such bad feelings, without loosing your moral compass, by relying better on guilt; I mean: to be true to yourself and what you see as appropriate behavior, finally disregarding others.
For instance, I do similar topic jokes while watching TV news when I think my mom can enjoy them. If not, I just keep them to myself not to bother my family, because I actually do care about them. However, when I've been surrounded by people whom I don't give a fuck about or even despise, I went with offensive jokes all the same to amuse myself, letting the worthless cronies around feel awkward in my place.
On the other hand, I've felt very bad and punished myself for doing things others didn't mind but I did. I'm still not sure but I currently find closer to ethics to act this way (driven by guilt).