Other episodes you're leaving out:
Conscience of the King: Kirk was one of those deemed 'worthy by
Governor Kodos (aka
Kodos the Executioner). I'd say that's 'facing death' - and I'm sure some of Kirk's friends were in the group deemed necessary to die so others can live. It had such an effect on him the speech he had Anton Karidian (who yes, turned out to be Kodos) read for the voice test was written from Kirk's memory - so that time he faced death had a large impact on him.
Obsession: Here we find that 11 years earlier while serving aboard the USS Farragut as a young lieutenant, Kirk and the Farragut crew encountered a Gaseous Creature The encounter killed half the Farragut crew (including Captain Garrovick, who was a hero and role model to Kirk), with Kirk and the ship's first officer among the survivors.
^^^
Again, another time where Kirk faced death and the loss of a number of comrades and a mentor/father figure he looked up to at that time. It had such an effect on him, when he encountered the same creature again, he became obsessed with killing it - and was willing to do so even if it cost others lives (the 1701 was supposed to rendezvous with another ship that had perishable medicine that was needed to stop a plague on a Federation planet.
I could list a few more examples from TOS - but yeah I found that line of Kirk's in STII:TWoK to be a bit ridiculous - still do.