If you disagree with a mandate required by your workplace, this letter can be used to state that you are choosing to resign rather than comply.
I have decided not to comply with the recent mandate and unfortunately must resign.
I feel that I am left with no other option, given my personal beliefs.
I have enjoyed my time with XYZ Company, and I would appreciate the opportunity to be rehired if the mandate is lifted.