I think it's a choice that you will have to make, whether to leave or stay.
If you do decide to quit the job, it seems like a good idea to find another job first.
Is it possible that you could detach yourself from the stress of the job as much as possible. Could you simply do what you can do each day at work and then leave the job behind as you go home?