As poetic as Hamlet's words are in this scene, he has definitely gone over the edge into a state of psychotic anger. His accidental killing of Polonius doesn't faze him, and he hurls a vicious Oedipal barrage at his mother. At the heart of his figurative language are mythological allusions and personification:
Hyperion's curls, the front of Jove himself,
An eye like Mars to threaten and command.
A station like the herald Mercury
New-lighted on a heaven-kissing hill.
This is Hamlet's description of his father. He then uses an extended metaphor to represent his mother's leaving him for Claudius (though she didn't actually leave him, since he was dead—or does Hamlet believe Gertrude was complicit in the murder?):
Could you on this fair mountain leave
To feed and batten on this moor?
The overall figurative device that informs this entire passage is hyperbole. Hamlet, to use his mother's words, "protests too much." Yet this is one of those cases, typical of Shakespeare, where the language is so rich and, almost in spite of its exaggerated quality, so appropriate that what would otherwise seem like pure abuse comes across as almost noble.
Often in Shakespeare, a single phrase is so striking that it sets the tone for, and influences, the way we hear an entire passage. This sequence begins:
Look here upon this picture and on this,
The counterfeit presentment of two brothers.
Though "counterfeit" here simply means "reproduced," as these images of Hamlet's father and Claudius are in the pictures he's showing his mother, the word is so striking in context that Hamlet seems to have already moved into a rarefied dreamworld of his own. His concept of the whole situation between Claudius and his mother is such that he's driven himself mad. What sane person could possibly say the humiliating things to his mother such as:
Nay, but to live in the rank sweat of an enseamed bed,
Stewed in corruption, honeying and making love
Over the nasty sty ...
The ultimate literary device here, even more than hyperbole, could be paradox. Hamlet is the one who is supposed to be engaging our sympathy. But the whole scene is horrible. Shakespeare gives us a huge contradiction in the character of Hamlet and in the nature of the language he uses, which is both startlingly poetic and at the same time hateful and ugly.