I WANT TO RETIRED FORM A JOB WHICH I MUST WRITE TO THEM THAT AM LEAVING, BUT I DONT KNOW HOW TO DO IT.
This might help you (I'm not sure)
With regret/ heavy heart, I am informing you that I am resigning from my position as XXXXX (Designation) for the XXXXX (Companay name) due to XXXX (Reason for leaving).
Thank you for the support and the opportunities that you have provided me during my service period. My experience with here has been very rewarding. I appreciate having had the opportunity to work for such a fine company. I wish you and the organization continued success.