idiom

At one's wits' end.

Theme: adversity Keyword: head

means

So worried or frustrated that one no longer knows what to do.

Example

After weeks of unexplained delays the organizers were at their wits' end.