Just be honest, don’t try to be over accommodating if you don’t feel like it or push away your feelings. Remember that this is your friend and you don’t want to have an elephant in the room every time you will meet each other again. Discuss your feelings with her/him honestly. Also remember that this might be as shocking to you as to your friend depending on when she/he found out that she
/he is gay.
You can use phrases such as “ thank you for sharing this with me”. This will show you are supportive without patronizing your friend. Ask her any questions you might have in mind, this will help both of you to go through the process more smoothly. For example “ what made you come to conclusion?”, “how do you feel?” and so on. I am sure you will be fine. You cared enough to write to me, this on itself shows such a caring friend you are.