These ideas might help:
1. Establish the context of the passage. Try to determine how the passage fits into the play as a whole. Does it come at the beginning, middle, end? Is it a "first"? For instance, is it the first time we see Hamlet and Ophelia together on stage? Is it Hamlet's first soliloquy? Is it a "last"? The last time we see Ophelia on stage? The last episode of spying in the play?
2. Relate the passage to overriding themes of the play: family honor, effects of revenge on the avenger, betrayal, action versus inaction, death, madness.
3. Determine what kind of speech is being addressed: soliloquy, ceremonial or public speech, dialogue.
4. Consider characters who are on stage who may not have speaking parts.
5. Address the structure of the passage. Is it in prose (usually indicative of madness or feigning madness)? Is it in verse form?
6. How is the passage itself organized? Does it involve shifts in tone? Does it move from dialogue to soliloquy? Contemplation of inaction to a plan for action? Or vice versa? Is it arranged as a philosophical argument in which the pros and cons of a decision are addressed, as in Hamlet's "To be or not to be" soliloquy?
7. Look at the figures of speech in the passage or images or motifs that are prevalent throughout the play: disease, rottenness, garden, for example. Be sure to relate a discussion of these to the ideas presented in the passage.
8. Pay attention to sound devices such as alliteration, assonance, monosyllabic lines that serve to highlight key words and ideas.
9. Be sure to address the first and last lines of the passage.
10. Consider the passage's impact on the audience. What reaction does the audience have upon viewing or reading this scene? Does it change our feelings toward the characters or their situation? Does it create more pathos? Less?
11. Lastly, what would be lost if this passage were cut from a production of the play.
You may structure your analysis as you see fit, but I would suggest that you begin with a general introduction stating the context of the passage, its major purposes. Then discuss the passage more or less in a linear fashion, perhaps even dividing the passage into thirds and discussing how each third contributes to the overall purpose of the piece. Shakespeare arranged the passage in a logical way, and following his arrangement to guide your remarks is a sensible way to attack such an assignment.