Not without speaking to a lawyer first! While these stories are horrible to hear, they are unfortunately too commonplace, especially where an employer refuses to foster a healthy and cooperative working environment.
If you have dealt with a longstanding history of discrimination in the workplace about your race/culture/accent/cultural dress and your employer has refused to take any action such as disciplining your harassers or implementing clear policies, you may have been subjected to what is known as a ‘poisoned work environment.’ This is where the workplace has been made so toxic by discrimination that you are unable to stay in the workplace and perform your duties.
A poisoned workplace is prohibited under human rights law, and may be covered under other legal frameworks as well depending on the scenario. Before you resign, speak with an employment lawyer about the best way to make your exit and how you may be able to pursue a legal claim. While it is possible to pursue such a claim after you resign, it can be more difficult to do so, and this may be avoidable by strategizing with a lawyer first.