The Doctor, like all Galifreyans can hold his breath for a very long time (upwards of ten to fifteen minutes) using his famous "Respiratory Bypass System", an evolutionary trait which he has used on numerous occasions to avoid gas, to prevent himself from suffocating and to ignore strong smells:
From TV: The Robots of Death
LEELA: Doctor, why didn't the helium make your voice go squeaky?
DOCTOR: Because I'm a Time Lord. I've been around, you know. Two
hearts, respiratory bypass system. I haven't lived seven hundred
and fifty years without learning something. After you. Little mouse.
From TV : The Caves of Androzani
DOCTOR: I can store oxygen for several minutes, Jek. Now, you must do everything you can to keep her temperature down until I get
JEK: Doctor, wait! I have just one oxygen cylinder left. I used it when I went into the baking chambers of the refinery. It will run
out in minutes, but it might help.
From the Prose Story : A Town Called Eternity
They dragged him the short distance to the gallows outside the
jailhouse and then they hoisted him up. They watched him swing for a
full quarter of an hour, with him too weak even to struggle or choke,
before they cut him down.
The undertaker had fled the moment the Doctor spoke to him.
Unsurprising, really, thought the Doctor, rubbing his bruised throat.
Unfortunately, most victims of a lynch mob didn't have a respiratory
bypass system to fall back on. On Gallifrey, hangings were less a form
of justice, more a risky hobby for seedy Cardinals with regenerations