I also sometimes get frustrated with some exercises, for example at this moment I am learning the G chord, my fingers play on the other strings and it sounds bad.
When this happens, I put the guitar down and take a short break and then start practicing again.
Thank you Alicia :)
Cheers