Do you think Dimmesdale would have been better off if Hester had named him initially as Pearl’s father?
No. He needed to go through all of his personal pain and misery so that he could realize what was truly important to him all on his own.
Oftentimes we have to delve deep into our own self-induced state of misery in order to come out realizing some new truth that helps us cope with the situation.
Puritans would not have been kind to him in any way shape or form. He surely would have been ostracized from the community and still would have been left to deal with all of his emotions regarding Hester. His misery would only have been compounded and it would've taken him even longer to do the right thing.
Personally, I wish Hester had forced him to take responsibility. Maybe the three of them could have lived happy lives together!
I'll play devil's advocate, though, and make the opposite argument. If Hester had taken matters into her own hands, she would have denied Arthur the opportunity to earn his own spiritual salvation. By living with his guilt for seven long years, Arthur's faith and moral foundation are tested; he suffers, and in suffering he is redeemed.
I suppose it could be said that if Hester had named Pearl's father to begin with, she, Chillingworth, and even Pearl would have been denied their own spiritual journeys. I guess Hawthorne wanted each of them to learn the hard way.
In my opinion, Dimmesdale would certainly have been better off had Hester revealed that he was Pearl's father when the trouble started. Because of his burden of guilt, Dimmesdale lived his last seven years in a physically and psychologically miserable manner. Basically, keeping the secret of his paternity and its consequences killed Dimmesdale.