Which allusions and references to other literary works are used in Shakespeare's Hamlet?
A good place to start looking for allusions is in Hamlet's soliloquies. Since Hamlet is characterized as a scholarly young man, his language reflects his education. In his first soliloquy, for instance, in Act 1, Hamlet refers to his deceased father as "Hyperion"--an allusion to the Greek sun god. He compares Gertrude to Niobe, a mother from another Greek myth. At the end of Act 3, Hamlet refers to Nero, the cruel Roman tyrant who killed his own mother:
Let not ever
The soul of Nero enter this firm bosom.
In this case Hamlet is reminding himself not to hurt his mother, not to be like Nero who murdered his.
We can also find allusions in Hamlet's dialogue with other characters. In Act 2, he demonstrates his knowledge of Roman mythology by asking the Player to recite lines from the Aeneid. Major players in the Trojan war are mentioned: Hecuba, Pyrrhus, and Priam. When talking with Polonius, Hamlet mentions Jephthah, an allusion to a story in the Old Testament, in which a father sacrifices his daughter for a military victory.
Ophelia also uses allusions. In Act 4, Ophelia's mad songs and phrases are derived from well known English folk songs.
These are just a few to get you started. An interesting analysis of these allusions might involve looking at what is revealed about the characters through the allusions they use--Hamlet's references to history, literary works, and the bible, or Ophelia's references to folk songs and tales, for instance.