To be fair, we might have to make a distinction between what we saw of a captain during their time on screen vs. what their past record was. The encounter with the Doomsday Machine "broke" Matt Decker's mind. True- he displayed some irrational behavior while taking command of the Enterprise, but in sacrificing himself and in a suicide shuttle run (while he STILL probably was a bit nutty), he gave Kirk & Spock the idea of how to save their own crew.
Same with Garth of Izar (not Garth of Izod, the clothing guy). IIRC, his previous achievements in Star Fleet made him one of Kirk's heroes. But something happened to him such that he had a breakdown (not sure if a cause was given onscreen for this). Following his craziness on screen (thanks to being back on his meds...) he actually seemed like he could be a decent man (if not a decent captain) again.
I would also have to vote for Harriman as worst captain, with a special vote for the various writers that thought that they had to create a weak, seemingly incompetent captain like Harriman to make Kirk & Co. look even better in comparison.