Run around like a chicken with its head cut off

To be in a state of chaos, to run around with what seems to be no purpose.

I spent the morning running around like a chicken with its head cut off when I heard that my mother was in the hospital.