Most likely, Hamlet is suffering from murdering his beloved Ophelia's father, Polonius. Also, sparing Claudius is having a detrimental effect on Hamlet. Allowing Claudius to live is creating emotional havoc in Hamlet's life.
Hamlet cannot continue to live with the turmoil he is experiencing over his Uncle Claudius' murdering of his father. He is an emotional wreck. He asks himself questions in his melancholy mood. In his most memorable soliloquy, he questions whether his suffering is to be or not to be:
To be, or not to be, that is the question.
Is it nobler in the mind to suffer
The slings and arrows of outrageous fortune
Or to fight against a sea of troubles,
And end them by fighting?
From this soliloquy, if Hamlet does not slay Claudius, he will continue to suffer in his mind. Whether or not it is more noble to suffer of the mind than to slay Claudius is questionable, but Hamlet cannot go on in the condition of his suffering. He will never rest until justice has occurred. In Hamlet's words, even death is preferred at this moment in the play:
To die, to sleep,
Nothing more, and by sleeping, to be able to say we end
The heartache, and the thousand natural shocks
That the body gets as part of life is an ending
To be wished for very earnestly.
Clearly, sparing Claudius is causing Hamlet's present suffering. He is ripped apart in his heart and mind. He cannot go on if he spares Claudius. He has admitted that he would rather be dead than to live and spare Claudius.