The major themes of Hamlet are almost too many and too varied to state succinctly. Some to consider are:
Revenge/Vengeance: Hamlet is revenging the murder of his father.
Death/Suicide: Hamlet considers killing himself, "To be or not to be"; Ophelia dies, the priest says by accidental, not by intentional, suicide:
Her obsequies have been as far enlarged
As we have warrantise: ...
... that great command o'ersways the order,
Yet here she is allow'd her virgin crants,
Confusion/Mystery: Frustration arises from the play because answers are elusive: Is the Ghost a demon? Is Hamlet crazy? Is Polonius good or bad? Does Hamlet love Ophelia? Did Ophelia kill herself?
Love/Lust: Hamlet and Ophelia seem to love each other. Then she rejects his letters and he breaks her heart. Gertrude seems a loving Queen and mother. Then she remarries exceedingly quickly after King Hamlet's death.
As a side note about Ophelia's death, the Catholic Church made (and makes) an exception in the designation of suicide when the person was in "[g]rave psychological disturbances, anguish, or grave fear ...."