The title Infinite Jest comes from Hamlet Act 5, scene 1, where they dig up Hamlet's father's court jester Yorick's head and Hamlet says:
Alas, poor Yorick! I knew him, Horatio, a fellow of infinite / jest, of most excellent fancy. He hath bore me on his back a /thousand times, and now how abhorr'd in my imagination it is!"
The entire novel is replete with further references to Hamlet.
At Ophelia's burial, the First Clown argues that her death was suicide (she drowns, either intentionally or unwittingly as she was insane), noting
It must be 'se offendendo;' it cannot be else. For / here lies the point: if I drown myself wittingly, / it argues an act: and an act hath three branches: it / is, to act, to do, to perform: argal, she drowned /
Here, Shakespeare pokes fun at legal language, as "Se offendendo" is a play on "se defendendo," the self-defense plea, effectively meaning to "self-offense." In Infinite Jest, people (ab)use things to defend themselves from life's horrors, but end up hurting themselves further; self-defense inherently becomes self-offense (e.g. painkillers end up destroying the body). Since Himself bears great similarities to Hamlet's own father, and since his suicide becomes a key element of the novel, it makes sense that Wallace would borrow this phrase.
Tiny Ewell says: "Don, the other night, after the fracas and your display of reluctant se offendendo which has an ironic and meta-textual footnote: "Latin legal blunder for self-defense's se defendendo is sic, either a befogged muddling of a professional legal term, or a post-Freudian slip, or (least likely) a very oblique and subtle jab at Gately from a Ewell intimate with the graveyard scene from Hamlet- namely V.i.9" (1076). While it is unlikely that Ewell would know the scene, Wallace's narrator certainly does, referencing not only the exact Hamlet scene the phrase appears in, but the meaning of that very reference.
Wallace also plays with legal language. In the episode discussing the "legal landscape" (827) of the fight, the narrator refers to Lenz's "part in Gately's legal embryoglio" instead of "legal imbroglio." The slip seems like an obvious reference to the novel's ubiquitous infantilization theme. The same event is also referred to as the "Lenz freakas" instead of "fracas." In both cases, Wallace's "post-Freudian" misspellings further Americanize words taken from foreign language (imbroglio comes from the Italian "imbrogliare" which means "to confuse"; fracas comes from the French "fraccaser" which comes from the Italian "fracassare" which means "to make an uproar"), performing a linguistic act of American imperialist consumption. Furthermore, the event also becomes a "señorio" instead of scenario (827), which makes sense given that American culture has completely absorbed Mexico.
Late in the novel, the ghost words "LAERTES"and "POOR YORICK" pop into the feverish Don Gately's head (832). In Hamlet, Laertes is the son of Polonius and the brother of Ophelia. In the final scene, Laertes kills Hamlet to avenge the deaths of his father and sister, for which he blames Hamlet. Here, at one of the novel's final scenes--of which there are many--there are many allusions to Hamlet. Himself is a wraith, a ghostlike presence, much like Hamlet's own father. Soon, Gately foresees/"dreams he's with a very sad kid and they're in a graveyard digging some dead guy's head up and it's really important, like Continental-Emergency important" (934) and later (chronologically, but early on in the novel) in the Year of Glad, Gately and Hal dig up Himself's head (17), mirroring the graveyard scene in the beginning of Hamlet.
One of Himself's production companies is called "Poor Yorick Entertainment Unlimited" (990).
In addition to its influence on the novel, Hamlet influences art within the text, as "Hal is sitting in windowlight with the Riverside Hamlet he told Mario he'd read and help with a conceptual film-type project based on part of" (171).
Joelle had suggested Himself call the cartridge "'The Face of the Deep'... which he's said would be too pretentious and then used that skull fragment out of the Hamlet Graveyard scene instead, which talk about pretentious she just laughed" (238).