Not only was he physically so weak but mentally also his health worsened. Dimmesdale's mental stress increased day by day to such an extend that he began to torture himself. As he escaped from the punishment of the society, he punished himself by practicing self-flagellation and also had many fasts “beating himself more brutally” and “He fasted as an act of penance.”
All the above penance he faced were internal. His external environment also augmented his health. The most torture he faced externally was by Roger Chillingworth, Hester's actual husband. Chillingworth had promised Hester that he would find Pearl's father and he was successful in doing so. Seeing Dimmesdale's condition, Chillingworth knew that he was hiding something which made him suspect and stick around Arthur. “There was no place so secret, high or low, where you could have escaped me-- except on this very platform!” shows how much he had and wanted to torture Dimmesdale. This also hints Roger was jealous of him as Hester loved him and not Roger and so wanted to take a revenge. And he was successful in secretly torturing Dimmesdale and taking his revenge. Dimmesdale was a Puritan priest of high ranking. He wasn't supposed to indulge in such activities and speak the truth. His increasing guilt made him convey better and better sermons due to which his congregation loved him more and more. This drew Dimmesdale to further internalize his guilt and persecute himself which led to more deterioration of his health. His unconfessed sin eventually leads to his own demise.
These all were some of the major deadly effects of him not revealing the truth. Dimmesdale's biggest mistake was that he din't commit it. The scene would have been totally if he din't commit this mistake. Dimmesdale should have admitted that he was Pearl's father as he would not have to face so much penance and definitely could have a peaceful death.
If he had publicized his wrongdoing, he could at least stay with Hester and Pearl peacefully and not meet her secretly in the forest. He would be able to form a family with her and live with the punishment if he wouldn't be hanged. If he would be hanged also, it would at least be less torturous and painful than he had felt and he would have been free from all the physical and mental stress. By comparing Hester's and Dimmesdale's lives, it is clearly seen that Hester, though scorned by the people the starting was forgiven by them due to her good deeds and led a good life unlike Dimmesdale. The evidences given above show that he had nothing in his life but only sorrow and pain. He had suffered more than Hester as it was not humans who punished him but God.
The letter 'A' which is revealed at the end of the story was a stigma, a punishment by God which also wouldn't be the outcome if he had admitted the truth. But according to Dimmesdale, due to the stigma and the penance he suffered, he had the chances of going to Heaven while Hester who was just punished by men had no chances of going to Heaven; the line: “He has shown His mercy, above all, in my trials. He gave me this burning torture to bear on my breast” suggests this. But overall he had to face loads of difficulties in his life and if he had admitted his sin long back, he wouldn't have to face such penance and would have been a happy man.
If Dimmesdale was to live his life again, either he wouldn't have indulged in sex with Hester or he would have left New England along with Hester and Pearl and gone to Old England and begin a new and happier life there. I do not think that Dimmesdale would have supported Hester and revealed himself as the partner sinner along with Hester as he had always been faint-hearted person and so would never have the courage to do so.