I think that Miller's design of a tragic ending in the play might be his statement on the design and configuration of American politics at the time. The rise of the McCarthy House Unamerican Activities Committee and the lack of a coherent voice that denounced such a misuse of political power, as well as those who collaborated with it and "named names" had to be disheartening to Miller, an individual who was as passionate about freedom as anything else. The idea of a corrupt political order being able to manipulate individuals into implicating one another with the result of consolidating power for those in the position of authority is a sad one for a democracy that was borne out of vigilance, personal expression, and complete accountability between government and its people. For Miller, this vision was discarded as HUAC and the Red Scare gained prominence. The same tragic and painful ending in the play might be what awaits America if individual commitment to freedom and ensuring that government is responsive to its people and not controlling of it.
I think that the choice of a tragic ending was a direct reflection of the tragedy that was the Salem Witch Trials. Many if the characters in the play represent actual people who were tried and convicted including the one male aaccused witch, Giles Cory, who was, in fact, pressed to death. This was a time when logic and reason did not prevail. For an excellent "real" account of the era, read Cotton Mather's account of the Trial of Martha Carrier. Mather was a minister, he was educated, he should have done something to stop the tragedy, but he did not. The reality wasd that the witch trials brought people back into the folds of the church out of fear at a time when church attendance was declining. Nothing good at all came out of the trials, and many innocent people suffered. Nineteen were hanged, Cory was pressed to death, two people died in prison, and many others spent time in prison for nothing more than being aaccused of witchcraft, often with no evidence at all (again, look at the Mather piece and you will see how circumstantial the evidence presented was in the actual courtroom). I believe that a happy ending would have trivialized the events and lessened the impact that Miller intended with the piece that serves as not only a social and historical commentary but also as a warning for future generations.
I think that you can argue that he wanted the ending to be "happy" for John Proctor. You can say that the story actually ends well for Proctor because he has self respect. Through most of the story he feels very bad about himself. But at the end, he has gotten to feel that he is really a good person.
A second thing I would argue is that it is possible that Miller wants to emphasize just how bad the effects of the witch trials are. I think he wants to dramatize how they destroyed people's lives.