Firstly, Hamlet's act is not actually murder but culpable homicide. He had no intention to kill Polonius. His target was Claudius and he thought that he was the one that he had stabbed through the arras. We know this because when Gertrude asks him if he knows what he has done, he replies:
Nay, I know not:
Is it the king?
When he later discovers that it was Polonius he killed, he responds thus:
Thou wretched, rash, intruding fool, farewell!
I took thee for thy better....
It is evident that he thinks he has stabbed Claudius. Polonius's death was, therefore, accidental and Hamlet cannot be said to have murdered him.
When Gertrude tells Claudius what happened, he says that it is a hefty and burdensome deed since it has to be answered for and involves two pre-eminent members of Danish society. He further expresses the idea that he could have been the one harmed if he had been there:
It had been so with us, had we been there....
He states that Hamlet's freedom is a threat to everyone, implying that the young prince should be curbed or in some way incarcerated to ensure the protection and security of all:
His liberty is full of threats to all;
To you yourself, to us, to every one.
Claudius then expresses concern about how the unfortunate incident is to be explained and feels that he would be held accountable since he had not restricted Hamlet, who he refers to as "This mad young man." He states that he loved Hamlet too much to have him placed under restraint, just as a person with a foul disease would not contain or treat it and allow it to fester and then break out to infect everyone else.
He has no sympathy for Hamlet, though, because he tells Gertrude to get over herself when she mentions that Hamlet was tearful about what he had done. Claudius clearly believes that Hamlet is remorseless. He then states that he himself will both face and answer for what has happened and that he will also provide adequate excuses in this regard. He then calls on Guildenstern and Rosencrantz to seek out Hamlet and find out what he has done with Polonius's body.
This incident sets in motion a series of events that will ultimately lead to the deaths of many innocents.