You catch the tantrum as it is STARTING. You give calm and firm warning as they start to hyperventilate and throw a fit because you said no or whatever (not legitimate pain or fear or fatigue etc of course) and when he continues, you give a firm swat and a warning that if he continues, he'll get another swat. He'll probably cry more and escalate that one, so don't give more than one or two swats and wait for next one. Once the raging fit is in full swing, you're not really able to teach, so let that one go. But you catch the VERY BEGINNING of the VERY NEXT ONE and do the exact same thing and NEVER ignore it. He will stop at a warning once he sees he NEVER gets away with it. How long that takes depends on your consistency and his personality and age (he's WAY in the habit of this at 3). You say you've tried spanking, but you may have been too random or angry about it, and I fail to see how he succeeds in executing long drawn out fits if you discipline it right away EVERY TIME and don't allow it.
I come from a long line of non-tantrumers, our 30+cousins are non-tantrumers, my kids are non-tantrumers (even my third born rager) and I've NEVER seen it not work -as in the parents are sitting by losing their minds because they can't possibly stop the tantrums. That just doesn't happen unless you allow it and ignore it. You can do this. Don't have the attitude that he is invincible, and don't let him act like that. When you were sick and needed a break, you should have TOLD him he was going out, not let him refuse and then let him tantrum when it was too late. You probably let him dictate, because you didn't want him to throw a fit about going...but then he threw a fit about staying....this will all settle down once you effectively nip the fits. You have to take charge if three-year-olds. they are TOUGH.
He's three, so you can tell him when he's totally calm what to expect and it will add extra reinforcement for when you actually do enforce and warn again later. Three is also OLD for this-it could have been nipped before two much more easily, so he WILL fight you, but you can succeed if you never get angry, never give more than one or two warnings, and are absolutely consistent. If you always have people around it's hard to discipline, but three is old enough (I have a three year old) to discipline after the fact with a clear explanation and warning for the next time once the coast is clear. Stay calm, and never let it go ignored or you've lost all your ground.
Sometimes my third (now three) born with the temper to beat all tempers, will succeed in starting a fit if I am preoccupied somewhere else and miss the beginning and don't warn her to stop. But if she's escalating into a crazy state, and I walk into the room and say her name,non-angrily, she stops on a dime because she does not want to be disciplined. There is no way she ever would have been allowed to just keep going on like that and she knows it. I haven't even had to discipline her for it since she was two, but the rule sticks.
If you think he's physically unable to comprehend you and cannot physically stop himself at his age, then he has a serious medical condition. Otherwise it's a discipline issue.
**also, I parent alone. My kids rarely see their dad. It's nothing to do with throwing tantrums. We have a happy, loving home. The more effective you are, the less time you will need to spend on discipline. When he is not tantrumming all day, you have MUCH more time to be loving, playful and close and build positive memories and bonds. It's not about anger, it's about enforcing his behavior.