Lose one’s head (over someone or something)

To become confused or overexcited about someone or something, to lose one’s self-control.

The young woman lost her head when she discovered that she had won the swimming competition.