I’m not sure if it could be seen as an excuse – but both of these deaths that Hamlet is responsible for were kind of accidents.
I mean, Polonius, sure, Hamlet meant to kill SOMEONE but he didn’t mean for it to be Polonius. Truth is, he didn’t check, though. He just ran his sword through the arras to catch the “rat” and catch him he did. It just wasn’t the rat he meant to catch. He’s still guilty for killing Polonius but he didn’t mean to. As for Laertes, Hamlet had no idea about the poison on the sword so when he cut Laertes with that unbated sword, he just thought he was returning cut for cut, slice for slice. He did not think he was killing Laertes. Would he have done it if he’d known? Hard to say. If he was mad enough, he might have. He got worked up enough to attack Laertes in Ophelia’s grave the day before so I wouldn’t put it past him. But as it stands, as it happened, Hamlet killed Laertes by accident, thinking he was only wounding him.
Laertes, on the other hand, very much intended to kill Hamlet and thereby, in a sense, accidentally kills himself, using Hamlet as his accidental murder instrument. Maybe the scales are even, though, because Hamlet killed two of Laertes’ family without intention and Laertes killed Hamlet, killed one, with intention. Do two without intention equal one with?