Like a chicken with its head cut off

When somebody is in a frenzy and he/she does everything without thinking over it

Examples

Michael was running around the room like a chicken with its head off. He couldn’t find his documents.