There was an old topic dealing with the fall of Denethor:
http://forum.barrowdowns.com/showthread.php?t=5881
What is interesting is that Tolkien didn't intend at first for Denethor to commit suicide. He wrote an outline of what was to happen after the Battle of the Pelennor Fields, in which Éowyn died as well as Théoden:
By evening of 15th [in pencil > 14] in a bloodred sun victory is complete. All enemy is driven into or back over Anduin. Aragorn sets up his pavilion and standard outside gate, but will not enter city, yet. Denethor comes down to greet the victors. Théoden dies. He bids farewell to Gandalf, Aragorn, Éomer and Merry. Théoden and Éowyn laid for a time in the royal tombs.
Words of Aragorn and Denethor. Denethor will not yield Stewardship, yet: not until war is won or lost and all is made clear. He is cold and suspicious and ? mock-courteous. Aragorn grave and silent. But Denethor says that belike the Stewardship will run out anyway, since he seems like to lose both his sons. Faramir is sick of his wounds. If he dies then Gondor can take what new lord it likes. Aragorn says that he will not be 'taken', he will take, but asks to see Faramir. Faramir is brought out and Aragorn tends him all that night, and love springs between them. (
History of Middle-earth: VIII. The War of the Ring, p. 360)