Get thee to a nunnery. Why wouldst thou be a breeder of sinners?
Immediately after "To be or not to be," Ophelia approaches Hamlet to return his love letters. Knowing (or suspecting) that Claudius and Polonius are watching, Hamlet turns savagely on her, denying he ever loved her and urging her to a convent. Ophelia is devastated.
Hamlet’s cruel rejection of Ophelia — whether genuine madness, performance for the spies, or displaced rage at Gertrude.