Quitting isn’t in the Doctor’s nature. Time after time he’s faced impossible odds, outnumbered, outgunned, out of resources and out of time, yet on every occasion he’s emerged victorious.
Anyone who’s ever met him knows it isn’t simply luck; nobody in the universe, not even the last of the Time Lords, can be that lucky. It’s a combination of knowledge, experience, dogged determination, trickery, and the Doctor’s own brand of genius bordering on insanity, plus an iron will, and two hearts big enough to encompass all of time and space.
Like his TARDIS, the Doctor is bigger on the inside.