Hamlet’s role as the “Revenger” goes too far. He certainly fulfills his primary task by killing Claudius to avenge his father’s death, but in the process he brings about the death of several people, including himself. His blinding drive towards revenge causes him to neglect and abuse the people around him. Ophelia, who he loves, is driven to madness and suicide by Hamlet’s obsession with revenge. He kills Polonius by mistake, thinking he’s Claudius hiding behind the curtain listening to he and his mother talk, and Gertrude later dies in an accidental poisoning. All in all, hamlet’s role as the “Revenger” counts for the death of eight people, including himself.
We might question what exactly the purpose of an avenger is; for example, are we limiting ourselves to the terms of a traditional narrative, or is the author free to tell their message by using traditional roles in an unusual way?
This is to say that, yes, Hamlet probably goes much too far if his objective was to avenge his father's death, but maybe that wasn't the point. Perhaps Shakespeare was trying to say that the idea of an "avenger" role is inherently chaotic and unreliable, and that by going too far, Hamlet actually fulfills the role in a more meaningful way.
If Hamlet had killed Claudius, and was able to do so cleanly and without any moral ambiguity, the story wouldn't be terribly memorable and the moral lesson would be pretty straightforward. However, because it's impossible for Hamlet to have this clean vengeance, perhaps the vengeance itself is corrupted, in keeping with the theme of things being rotten. Hamlet cannot fulfill the role in a traditional way because the circumstances are not traditional.
On the other hand, we might say that Hamlet fulfills the role quite well by remaining committed to it, despite the overwhelming tragedy that his efforts cause. We might also argue that these collateral deaths are Claudius's fault for having instigated this entire situation in the first place.