By the end of Act 3 things have changed quite a bit for Hamlet. On the "revenge" front, now has the proof he so desparately wants against Claudius. During the "play within a play" Claudius is disturbed enough to get up and leave, and Hamlet takes this an admission of guilt. Now Hamlet is free to go forward an exact his revenge for the death of his father. Unfortunately, Hamlet's first opportunity for revenge is a moment when Claudius appears to be in prayer and Hamlet doesn't think this is a perfect moment, so I lets the chance go by.
On the "romantic" front, his love life is in a shambles. He has had a terrible confrontation with Ophelia where she returns presents he has given her and he then declares he never loved her. He goes on to tell her to get herself to a nunnery and stay away from the sinful nature of men. He insults the behavior of women and, in general, is acting crazy. Ophelia is convinced that Hamlet has lost his sanity as evidenced by the way he is speaking to her. The scene is actually part of Hamlet's crazy act and brought on by overall frustration with his mother's marriage and Ophelia's dishonesty about her father spying on them at that that very moment.