Proctor is a God-fearing Puritan, but he is also an independent thinker. He is painfully aware of the true motivations of the accusers: Abigail wants his wife executed, Ruth Putnam is acting on behalf of her land-hungry father, Walcott wants revenge for the death of the pig Martha Corey sold him, and Goody Putnam accuses Rebecca Nurse because of the long-standing feud between the Nurses and the Putnams.
Proctor also realizes that the court officials, Danforth and Hathorne, are fighting to preserve the authority of theocratic rule in the Puritan colonies, and that Parris and Putnam are pressuring them to believe the worst about Salem's accused.
When Proctor screams "God is dead," it is an expression of his frustration with the situation in Salem. He is deeply disillusioned and perhaps believes that if the Puritans who sacrificed so much in coming to America to escape religious persecution in England cannot set up a Christian, moral, and righteous community, then the idea of a God who upholds justice is, in effect, "dead" in his society.