The next soliloquy Hamlet has after seeing the ghost of his father is in Act II, Scene ii after the players, Rosencrantz and Guildenstern, have left him alone. In this soliloquy ("what a rogue and peasant slave am I"), Hamlet expresses his frustration with the fact that the actor could create tears in an instant about a fictional character, but he has lost his actual father and cannot even do anything about it. Through this he also decides on the plan to try and catch Claudius' guilt.
The mood changes from this outrageous romantic story because of how much they loved eachother, and how they risked faking their deaths for one another. Then it finally lead the mood into a tragedy due to their actual deaths, and how broken and connected everyone became in the end.