"Consult the Book of Armaments!!"
OK that was Monty Python. But I of course have a copy of the full LOTR trilogy sitting right here on my desk.
In the book, Faramir comes back barely alive and his father is completely overwhelmed by his sorrow.
"During all this black day Faramir lay upon his bed in the chamber of the White Tower, wandering in a desperate fever; dying someone said, and soon 'dying' all men were saying upon the walls and in the streets. And by him his father sat, and said nothing, but watched, and gave no longer any heed to the defence."
Denethor is so upset by his only remaining son dying that he completely gives up on the town around him to sit by his son's side.
Pippin is there too. He is observing the pair. "And as he [Pippin] watched, it seemed to him that Denethor grew old before his eyes, as if something had snapped in his proud will, and his stern mind was overthrown. Grief maybe had wrought it, and remorse. He saw tears on that once tearless face, more unbearable than wrath."
Denethor most definitely has realized his mistake and is completely overwhelmed by what he has done. It is this knowledge that makes his mind snap.