Hi Fobrorobin,
I understand how shocked and devastated you must be feeling and you're going to go through many emotions,, but you will get through this. I disagree with the above post that being gay isn't an illness and shouldn't be thought of something that needs to be cured. At least I give him credit for being honest. He has probably struggled with this and thought that he could conform to marriage with a woman. I don't think he meant to hurt you and I hope this lifts a little of your grief. He was probably so confused about his own sexuality. My brother (now passed )was gay. I know you feel angry right now, but I hope one day you can understand how he struggled with his feelings and that's why he did this.
Right now you need to take care of yourself and don't think that this was your fault. It's okay to feel all these emotions and it will help you to finally get to a peaceful place. I'm sorry this happened and I hope you'll feel better very soon.