Don’t say: “I sent the letter two months before.”
Say: “I sent the letter two months ago.”
Or: “I sent the letter two months back.” (informal)
Ago and back are used for past times from the present moment.
Before is used for past times from another time in the past.
Here are some examples of before:
- Yesterday I missed my train. I got to the train station at 7:10, but the train had left ten minutes before.
- I was very happy when I got this job last year, because I had lost my previous job six months before.