Act IV is full of imagery of diseases and illnesses. Here are some examples:
Mad as the sea and wind when both contend
Which is the mightier. In his lawless fit,
Behind the arras hearing something stir,
Whips out his rapier, cries 'A rat, a rat!'(10)
And in this brainish apprehension kills
The unseen good old man.
This is Gertrude speaking to Claudius about Hamlet in Act IV Scene i. The first word "Mad" must be taken literally (meaning insanity), for Getrude is now convinced that Hamlet suffers from some form of madness. The word in line 8, "fit", however, is not to be taken literally but metaphorically, for Hamlet was not having an actual epileptic "fit" or seizure, but instead, Gertrude is saying, Hamlet is overtaken by a "fit" of (possibly temporary) insanity. Claudius responds:
Alas, how shall this bloody deed be answer'd?
It will be laid to us, whose providence
Should have kept short, restrain'd, and out of haunt
This mad young man. But so much was our love(20)
We would not understand what was most fit,
But, like the owner of a foul disease,
To keep it from divulging, let it feed
Even on the pith of life. Where is he gone
In line 22 the word "disease" is first used in this act. The King is saying that he and Gertrude should have acted to restrain the insane Hamlet, but, like someone who has a horrible disease, they ignored Hamlet's problem (because, presumably, they love him and were unwilling to face the truth) until it ended in death (Polonius's). In this case a disease is likened to the King and Queen, not to Hamlet.
In Scene iii Claudius speaks about Hamlet again.
To bear all smooth and even,
This sudden sending him away must seem
Deliberate pause. Diseases desperate grown
By desperate appliance are relieved,(10)
Or not at all.
Here Hamlet's insanity (so long left untended by himself and Gertrude, the king means) is compared again to a disease let go to "desperate", or extreme, lengths must be cured by desperate measures. The king is saying that he must take some extreme measure against Hamlet (in this case banishment followed by death) in order to keep the "disease" (the consequences of Hamlet's madness) in check. Later in the scene Claudius says this:
And, England, if my love thou hold'st at aught—
As my great power thereof may give thee sense,
Since yet thy cicatrice looks raw and red
After the Danish sword, and thy free awe(65)
Pays homage to us—thou mayst not coldly set
Claudius speaks of the Kingdom of England's "cicatrice" (scar) from its battles with Denmark. Claudius uses his country's military dominance over England to order the death of Hamlet away from Denmark's shores. He continues,
Do it, England;
For like the hectic in my blood he rages,(70)
And thou must cure me. Till I know 'tis done,
Howe'er my haps, my joys were ne'er begun
"Hectic" is a fever, to which Claudius compares Hamlet. He says that he must cure himself of this fever (Hamlet) or he will never be happy. It was the custom in those days to bleed a person with a fever, so this is a double metaphor meaning to rid Claudius of Hamlet, and also to "bleed" -- that is cause the death of Hamlet. In this act it is often Claudius who speaks of disease, signalling to the audience that he is the disease in the kingdom of Denmark.