Mr. Hooper's decision to don the veil is certainly a sign of his superior insight and virtue, and most definitely not a signal of mental illness. We learn, when he tells Elizabeth, that he wears the veil as a result of his realization that all of us are sinful creatures, and yet all of us try to hide that sin from our peers. He doesn't say this directly, but he asks, "'if I cover [my face with the veil] for secret sin, what mortal might not do the same?'" He also explains that he will only have to wear this veil during life because it will be no longer necessary after death: "'it is not for eternity!'" he cries. The reason he'll no longer have to wear the veil after death is that his sins will be laid bare before God, and Mr. Hooper will have no need to hide them anymore. In eternity, his peers will not be his judge, but rather God will.
The response of Mr. Hooper's parishioners also lets us know that his decision to wear the veil is not a sign of madness. When he discovers that each of us hides our secret sinful natures from one another, thus holding up a figurative veil between ourselves and others in an attempt to hide our sins, he is right. After his first sermon wearing the veil, the narrator says that
Each member of the congregation, the most innocent girl, and the man of hardened breast, felt as if the preacher had crept upon them, behind is awful veil, and discovered their hoarded iniquity of deed or thought.
Every person, no matter how seemingly innocent or hardened, becomes suddenly aware that Mr. Hooper knows of their "hoarded iniquity of deed or thought." He knows that they have secret sins, and so "the hearers quaked." If the veil were only a sign of Mr. Hooper's madness, then his hearers would likely be baffled by it, but they would not recognize the immense and incredible truth of it. Clearly, then, Mr. Hooper has realized something that no one else has: that we are not, as individuals, sometimes sinners, but we are, as human beings, inherently sinful. And despite this similarity, we insist on hiding our sins from one another and thereby prevent our ever really knowing or being known by anyone.