I understand this completely. I do have anxiety problems and although I love solving errors after about 3 hours of seeing errors, fixing 10 just to get 5 more I too go crazy (i've broken monitors ) However, Klonopin is good for that as I believe that is an anxiety issue and not a coding issue (i've been a coder my whole life, its what i'm good at.)
The best thing to do if you find yourself that aggravated is to stop.
Go on a walk, think about the problem without trying to fix it. What causes it?
I find I near immediately begin to find the answers to a couple, and when i'm done with my walk/shower/whatever i'll read up on similar errors and only when I feel I can really tackle it do I come back.
Of course that is while learning, I have been a PHP guy for 10 years now so when it comes to that I know how to solve whatever error comes at me. Write now I am learning C and the amount of errors sometimes makes me put my computer down and literally say F that, only to begin to understand what I was doing wrong as soon as I stop trying to fix it and wonder why it was broken in the first place.
But i'm a really, really weird dude...