If you've tried to resign in the past only to be convinced to stay, this letter makes it clear that you're really leaving the job this time.
Dear Mr./Ms. Bossname,
This time I really mean it! Last time I tried to quit, you convinced me to stay and I agreed for the sake of the company and because you're such a great boss.
My first instinct was correct and it's time for me to move on. While I'm grateful for your confidence in me and my work, this is no longer the place for me personally or professionally. I have truly enjoyed many aspects of working here.
I wish you the best moving forward and would be happy to help in the transition. I can stay on full-time for another two weeks, and/or I would be available as a paid consultant for another month.