When someone has gone out of their way to help you, write them a thank-you note.

Literal

Someone [subject-が] overdoing-it [even-まで] you [object-を] help-gave-for-you [when-時には] thank-you-letter [object-を] write-[gentle-command-なさい].

Three useful pieces stack here. 無理して ('pushing oneself, overextending') + the extent particle まで yields '(even) to the point of overdoing it.' ~てくれる adds giving-direction: the helping is performed for the listener's benefit, a nuance English leaves implicit. The sentence-final ~なさい is a gentle imperative — softer than a bare command but firmer than ~てください — typical of parental or instructional voice.