It is not healthy to work in a toxic environment. It will affect your health and mental peace. I think you should give the resignation but before that, here's what you should think of. Once you submit your resignation, you will have a notice period. You can look for jobs then. LinkedIn is one good place for you. You can update your profile and look for jobs and be contacted by recruiters. You have worked hard for your company so I don't think you will have difficulties finding a new job. But just to prepared, let me tell about the situation if don't get a job before your notice period ends. It's not a bad thing to not have a job when you are doing it for the right reason. You can look for jobs then too. And in your free time, you can update your skills or learn new technology.