My question involves labor and employment law for the state of: California

I work at a hotel. In order to save money and met budget, I was forced to perform hourly employees duties. I spent a significant amount of time to basically replace an hourly staff hours, working really long hours. There were days I was working from 7 am to 8 or 9pm. Is this legal?

Second question, I recently went through a 2-month psychiatric therapy because of the stress and I honestly cannot take this anymore. May I quit my job and apply for EDD while looking for a part time job and go back to school?