Here is my opinion. You said government agency, so first, if there is anything sensitive about your work I wouldn't do it this way no matter what, give them 2 weeks (some require a bit more). It could affect how you are reviewed in the future if you ever want to get back into that type of work and could also subject you to heightened scrutiny now (the kind you don't want).
Second no matter which you choose. Even if you hate your boss, be honest and up front. Say something like look, this isn't working, I am stressed beyond belief, I know I am not giving you what you deserve now and I need to move on immediately to start over. 2 things can happen, the person may have some compassion and say cool, I get it, I don't like it, but I get it and good luck. Or they could say get the hell out and don't come back. Either way, you get what you want. The third is they might try to convince you to stay, which makes it a little tougher, but just stick to your guns and be honest. Frankly, in this situation you feeling anxious about it works in your favor as they will see it as genuine versus you being a prick, and it won't affect you later so no worries.
No matter what, don't make it personal about the supervisor or the company, environment etc. Just stick to the fact you need to pull the cord before you burnout and become useless (or whatever is your case).
Last point. I have a number of developers who work for my company and I don't generally care how they left their last employer, all I want to know is can you do the job and if you are treated well will you work out. And that is up to me to decide, not an action you took prior (unless I somehow see a pattern).