Just ignore it. When you hold your breath, the worst that can happen is temporarily passing out (and it rarely reaches that level for a child). When you pass out, your body automatically starts breathing again, and you wake up. (Obviously you should make sure there's nothing dangerous in the way if he falls.) If you want to try something just for the sake of trying something, try tickling.
It's so weird that you bring this up ... I saw an Andy Griffith episode a couple of weeks ago for the first time in yeeears, and that was in it!

One of Opie's so-called "friends" (bad boys) was doing this, so Opie tried it, too. Andy ignored him. It was hilarious.
Kids will try anything to test you or ruffle your feathers. As long as you stay calm, they'll realize it doesn't work.