That's because he uses Theoden as contrast. Both men are leaders and warriros, past their prime, decieved into thinking they face a hopeless battle. Both have lost a son and the 'replacement' seems unsuitable. Neither likes Gandalf or the words he brings, and neither wishes to face the enemy that is coming.
The difference is, Theoden responds to Gandalf and is healed; he dies, but victoriously in battle, completely redeemed. Denethor will not listen and commits suicide. There are other parallels between the two but I'm sure you see my point! It's also hardly a coincidence, in my mind, that Eowyn marries Faramir.
That is why I like these discussions. I learn so much.