Why did Dimmesdale say, before his death, that God was merciful to him?
In Chapter 23 of The Scarlet Letter, after the Reverend Dimmesdale finishes his Election Sermon he addresses the people of the Puritan colony, confessing to his "sin and infamy." Calling to Hester and Pearl to join him, he mounts the stairs to the scaffold against the pleas of Roger Chillingworth who tells him he can still save him.
Dimmesdale calls himself a sinner and reveals his chest with "a flush of triumph" while the sinister Chillingworth complains, "Thou hast escaped me!" To this, Dimmesdale replies, "May God forgive thee!.... Thou, too, hast deeply sinned!" As he then kisses Pearl, she is humanized and pledges that she will grow up amid joy and sorrow and not constantly battle the world.
After the minister bids her "farewell," Hester asks, "Shall we not meet again?" The minister replies,
'Hush, Hester, hush!....The law we broke!--the sin here so awfully revealed!--let these alone be in thy thoughts! I fear! I fear! ...it was thenceforth vain to hope that we could meet herafter, in an everlasting and pure reunion. God knows and He is merciful! He hath proved his mercy, most of all, in my afflictions. By giving me this burning torture to bear upon my breast! By sending yonder dark and terrible old man, to keep the torture always at red-heat! By bringing me hither, to die this death of triumphant ignominy before the people! Had either of these agonies been wanting, I had been lost for ever! praise be his name! His will be done! Farewell!
Oddly, Mr. Dimmesdale's declarations are not those of a Puritan minister. And, it is here that Hawthorne's greatest invective is given against Puritanism which will allow no sin., which will forgive no sin. For, in the speech of the Reverend Dimmesdale is revealed more the concept of forgiveness for sins after confession--a concept of the Anglican church from which the Puritans had broken.
Dimmesdale says that God is merciful because he has been allowed to confess his sin, and so now he can make atonement and receive the mercy of God, the forgiveness of his sin. "By giving me this burning torture to bear upon my breast!" means that Dimmesdale feels God is kind and merciful because He gave him a penance to do for his sins. [Remember that Dimmesdale has begun scourging himself with ropes in atonement for his sins.]
By suffering here on earth, the Reverend Dimmesdale feels that he can still be rewarded for his good deeds on earth--God is merciful--another concept in direct contradiction of Puritanism that holds that some are just chosen as the elect. "God is merciful; God will forgive sins is a holdover from the old country; the church of England. There is redemption.