I have no idea if this will help or not, but I'll just throw it out there:

Is it going to school/class itself that's making him anxious and wanting to leave? And if so, could you possibly say (on a limited basis, of course) that, okay, you're just going to take a step back and leave school -- but work on a project for that or another class instead? Maybe that way he'd be able to avoid the extra anxiety over class before it gets to a meltdown, if he can only handle half a day AT school, and at the same time get things done.