Io (donna) ti sono statA utile
Io (uomo) ti sono statO utile.
sono stata / sono stato => si riferiscono a chi scrive la lettera, non a te
IO sono stato utile / IO sono stato utile => dipende se IO sono un uomo o una donna
If who writes is a man, he writes IO SONO STATO
if who writes is a woman, then she writes IO SONO STATA
in this case, the verb refers to who is writing, i.e. your female friend