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.
In this scene, Claudius comes and talks to Gertrude and finds out that Hamlet has just killed Polonius, who was behind the arras.
Caludius's main concern is for himself. The first thing he says is, essentially, "that could have been me." He is talking about what would have happened if he would have been the one hiding.
Then Claudius starts worrying about what the Danish people will think of him now that this has happened. He worries that they will blame him for not keeping better control over Hamlet when he is obviously a bit crazy. This is why he decides to send Hamlet to England -- to get him out of sight and (we learn later) to kill him on the way.
Claudius's first concern is for his own safety. He says, "It had been so with us had we been there." He acknowledges that Hamlet would have killed anyone who happened to be standing in Polonius's position.
Claudius's second concern is also for himself. He is concerned that he will be accused on not reigning in Hamlet's wild behavior. He says, "Alas, how shall this bloody deed be answered? / It will be laid to us." Claudius is more concerned for public perception that for Hamlet's condition.