If you resign because your employer's behaviour towards you amounts to a fundamental breach of contract then you could claim constructive dismissal, subject to eligibility. You must have brought a formal grievance against your employer and waited 28 days for a response.
The treatment you have received must, however, be so serious that you can say it goes to the root of your employment contract. An example could be a failure by your employer to deal with your serious complaints that you are being bullied by your manager.
Just One More Click: Doggy drama about staying safe online at work.