The trick with this type of letter is to keep it simple, and be nice - your future employers may ask for a reference, so it's not a good idea to upset them!
You should addresss it to your line manager, and copy in the company director.
Something like this -
Dear Mr / Ms Bloggs
It is with regret that i write to you to tender my formal resignation from my post at Bloggs And Co.
I have very much enjoyed my time working with the company, but I feel that at this time, I need to develop my career and this will be best served by encountering some new challenges in a different environment.
I would like to thank you and all my collagues for the opportunites to develop my career thus far, I have learned a lot of useful skills during my time with Bloggs and Co.
My proposed finishing date will be DD / MM /YY, based on the required formal notice period, and I look forward to my P60 and other appropriate documentation in due cours.
Thank you for your kind attention in this matter.
Yours Sincerely
andrea81.
I wouldn;t get into personal correspondence, it sounds like you need to cut your losses, and this is the best approach, formal, and to the point, no bad-mouthing.
Good luck with your new position.