My advice, based on 45 years working numerous jobs, is never to quit, no matter how bad things are, until you have already been hired by another employer.   The primary reason for this is psychological.   When you start a new job you naturally feel optimistic about the course of your life.  If you are unemployed, you feel depressed.