In chapter 12 there is only one mention of Arthur Dimmesdale's chest, and it is after the meteor is witnessed by the villagers, when he stood at the scaffold with Pearl and Hester in what is described as an "electric chain" formed by the three.
At that point, the narrative reads:
And there stood the minister, with his hand over his heart; and Hester Prynne, with the embroidered letter glimmering on her bosom; and little Pearl, herself a symbol, and the connecting link between those two.
At this point in the narrative, Chillingworth had been suspecting that something other than physical is gnawing away at the minister. He discovers that Dimmesdale, out of the guilt and sadness he feels from what occurs with Hester, has carved a letter "A" on his chest. This act of self-mutilation is essentially his own way to "share" the pain of Hester's humiliation. Unfortunately, he still refuses to divulge the true nature of his sin and continues to keep it a secret. No matter how many letters Dimmesdale carves on his chest, he still needs to come out clean and redeem himself the proper way.
Therefore, the reason why Dimmesdale continuously puts his hand over his heart is because that is the location of the letter that he had put on his chest, and the pain that he carries due to it is bad enough to keep him in a consistent state of ailment.