Interestingly, Chapter 23, which is when Dimmesdale dies, gives no such certainty about his eternal fate. Dimmesdale himself highlights the nature of the sin that he and Hester have committed and, in response to her question about whether they will be united together in heaven, is only able to say that "the sin here so awfully revealed" may be something that will prevent them from being united. The only consolation he is able to offer Hester and himself is to trust in God's will. He does, however, also reference the many sufferings he endured in his life, saying that without them he would have been "lost forever." This does indicate that he is heading to heaven in his death.
A second point to consider is the sense of peace and tranquility that descends on Dimmesdale as he dies. Note how he is described as he speaks to Pearl, his daughter, and gains a kiss from her:
...and there was a sweet and gentle smile over his face, as of a spirit sinking into deep repose; nay, now that the burden was removed, it seemed almost as if he would be sportive with the child...
This sense of restful peace that dominates the description, where his gradual dying is compared to somebody falling into a deep sleep, suggests that he is heading somewhere better and that his death is not something he is fighting against. Such evidence suggests that Dimmesdale is saved at his death, but this is not something that is conclusively demonstrated in the text. Dimmesdale is happy to entrust himself to his God, and he has faith in him alone.