at your wits' end
Meaning: If you're at your wits' end, you're upset and frustrated because you've tried everything you can think of to solve a problem, and nothing has worked.
For example:
- I'm at my wits' end! I've been trying to solve a problem with some software all morning and I still haven't got it to work!
- Kelvin says he's been trying to get tickets for the game all day, but he's at his wits' end. Nobody's got any left.