Dear (Name of Recipient)
First Paragraph: The reason for writing this farewell letter.
Second Paragraph: Thank the person for help/support/guidance. Recount good times.
Final Paragraph: You can mention your contact details or how the person would be able to reach you in future.
Sign Off by giving best wishes to the reader.