I would suggest that one connection between both works is that the principal character in both works struggle with the will to act. Hamlet and Proctor endure the same moral paralysis that precludes them from acting. Their "function is smothered by surmise." This becomes one of the critical traits of Hamlet's characterization. He is so much the modern hero because everything is cerebral, nothing is actual. Hamlet's machinations are so intense that it prevents him from acting. Some could argue that this is deliberate in that Hamlet specifically desires not to act because to do so involves too great of a commitment. For Proctor, the paralysis is much the same. The first two acts show him as a man incapable of acting. He dismisses what Abigail is doing in the opening act in the idea of "kids will be kids." He then continues onward in Act II, demonstrating a failure to take up the advice of his wife because of his fears of what it will show and what it reflects. It is in this that both Hamlet and Proctor suffer from failing to recognize the need and will to act. This trait becomes critical in their development, reflecting how much they need to overcome by the respective ends of their narratives.