“This discovery is confirmed by a legend that has come down to us from classical antiquity: the legend of King Oedipus and Sophocles’ drama which bears his name.
“Oedipus,
son of Laius, King of Thebes, and of Jocasta, was exposed as an infant
because an oracle had warned Laius that his still unborn child would be
his father’s murderer... The action of the play consists in nothing other
than the process of revealing, with cunning delays and ever mounting excitement
that Oedipus himself is the murderer of Laius, but further that he is the
son of the murdered man and of Jocasta. Appalled at the abomination which
he has unwittingly perpetrated, Oedipus blinds himself and forsakes his
home. The oracle has been fulfilled.
“His destiny moves us only because it might have been ours - because the oracle laid the same curse upon us before our birth as upon him. It is the fate of all of us, perhaps, to direct our first sexual impulse towards our mother and our first murderous wish against our father. Our dreams convince us that his is so... While the poet, as he unravels the past, brings to light the guilt of Oedipus, he is at the same time compelling us to recognize our own inner minds, in which those same impulses, though suppressed, are still to be found. The contrast with which the closing chorus leaves us confronted strikes as a warning at ourselves and our pride, at us who since our childhood have grown so wise and so mighty in our own eyes:
. ..Fix on Oedipus your eyes,
Who resolved the dark enigma, noblest champion and most wise.
Like a star his envied fortune mounted beaming far and wide:
Now he sinks in seas of anguish, whelmed beneath a raging tide...
“There is an unmistakable indication in the text of Sophocles’ tragedy itself that the legend of Oedipus sprang from some primaeval dream-material which had as its content the distressing disturbance of a child’s relation to his parents owing to the first stirrings of sexuality....

OEDIPUS AND THE SPHINX BY GUSTAVE MOREAU
HAMLET AND THE GHOST BY HENRY FUSELI