If I want to write "Thanks for reminding me" in a formal e-mail, which is best:
Danke für die Erinnerung.
Danke, dass du mich daran erinnerst.
Danke, dass du mich daran erinnert hast.
Or is there another better phrase for this?
While "best" is subjective and depends on the circumstances, all your examples are correct and idiomatic.
Although, since you mentioned it's a formal e-mail, you probably wouldn't address the recipient with Du. It is appropriate only for private correspondence and if you are on first name terms.
So in a formal context, either address with "Sie" or omit it completely, which would make "Danke/Vielen Dank für die Erinnerung" my choice.
This adds a widely used maybe little more relaxed variant that can also be used in a business setting:
Even though "Danke" is missing this is polite as by using "gut" you add the connotation that the reminder had a beneficial effect ("Danke" alone does not say so). To emphasis this further you can also write "Sehr gut, dass...".
They all are ok. It depends though what you want to say.
Is a bit too short to be formal. So it sounds a bit "pissed".
Vielen Dank, dass Sie mich daran erinnern.
Vielen Dank, dass Sie mich daran erinnert haben.
The last two are more or less equal, but I'd go for the second.