Put it near the end of a fail or reaction sequence, after the setup has landed and before the payoff. Follow it with a funny laugh to close the joke, or lead into it with a ba dum tss drum sting to set up the groan.