Hamlet's profound melancholy in Act 1 stems from a convergence of grief, betrayal, and existential crisis:
King Hamlet died less than two months ago. Hamlet wears "suits of solemn black" (1.2.78). He idolized his father ("so excellent a king," 1.2.139). The grief is fresh and deep.
Gertrude married Claudius within a month ("funeral baked meats / Did coldly furnish forth the marriage tables," 1.2.180-181). To Hamlet, this is:
Claudius seized the throne (bypassing Hamlet, the heir) and now demands Hamlet stay in Denmark ("chiefest courtier," 1.2.117) rather than return to Wittenberg. Hamlet feels trapped, surveilled, and politically neutered.
The Ghost confirms Hamlet's darkest suspicion: murder ("Murder most foul," 1.5.27). This transforms grief into a sacred duty: revenge. The burden of proof and action paralyzes him.
His first soliloquy (1.2.129-158) reveals a worldview shattered: the world is "an unweeded garden / That grows to seed; things rank and gross in nature / Possess it merely." He contemplates suicide ("self-slaughter") but fears the "canon 'gainst self-slaughter."
Summary: Hamlet is not merely "upset." He is in moral shock—his father murdered, mother corrupted, uncle criminal, universe disordered, and himself charged with a bloody correction he philosophically abhors.