There is disease and decay imagery throughout the play, but in Act 4 the disease imagery is primarily used by Claudius in his talking about the problems he is having with Hamlet. Here are three examples:
1. In talking with Gertrude about Hamlet in scene 1 Claudius says that the people will think that it was their great love of Hamlet that kept them from keeping him under control or stopping him, and therefore he was a danger and he killed Polonius. He compares this to a disease when he says they are "like the owner of foul disease, to keep from it from divulging, let it feed even on the pith of life." They are willing to let the disease (of Hamlet) destroy them rather than admidt there is problem.
2. In a short soliloquy at the start of scene 3 Claudius calls Hamlet a disease and states that, "diseases desparate grown by desparate appliance are relieved." He means that the only way to end the problem of Hamlet is by some desparate means -- he plans to have him killed in England. The worse the disease the worse the cure (like cancer and chemotherapy).
3. At the end of the scene 3 Claudius again refers to Hamlet as his disease and says he is "like the hectic in my blood (and) he rages" and is calling on England to "cure" him.
In the first act of Shakespeare's Hamlet, one of the guards named Marcellus, who has witnessed the ghost of Hamlet's father, observes later, "Something is rotten in the state of Denmark" (1.4.90). This observation begins the imagery of disease.
Here are other examples of disease imagery found in Act IV:
--Early in this first scene, Gertrude describes to King Claudius that when Hamlet killed Polonius, he seemed deranged and his mind diseased. While Polonius was behind the arras in Gertrude's chamber, Hamlet heard him stirring, and he stabbed Polonius. Later, when Claudius asks how Hamlet is, Gertrude describes what has happened by saying,
Mad as the sea and wind when both contend
Which is the mightier. In his lawless fit,
Behind the arras hearing something stir,
[Hamlet] Whips out his rapier, cries, "A rat, a rat!"
And in this brainish apprehension kills
The unseen good old man. (4.1.7-12)
Here "brainish apprehension" means insane imagining, which denotes mental disease, as is suggested too by the words mad and fit.
--In the third scene of this act, King Claudius plans to send Hamlet away. He ponders what methods he will use to do this: he must seem fair-minded and calm and without motive. While he ponders, Claudius likens Hamlet to a disease, a fever in the brain:
The present death of Hamlet. Do it, England,For like the hectic in my blood he rages,And thou must cure me. (4.3.67-69)
To my sick soul (as sin’s true nature is)Each toy seems prologue to some great amiss. (4.5.18-19)
Feeds on his wonder, keeps himself in clouds,And wants not buzzers to infect his earWith pestilent speeches of his father’s death,Wherein necessity, of matter beggared.... (4.5.65-68)