Why did he not tell you he was gay when he sensed you were into him in the beginning? Cruel to wait until months later to tell you that. Maybe he can fix you up with a straight friend of his that is similar to him in what he likes and you like and that match will work out for you? Did you find out by accident he was gay or he finally told you so?
“Accept — then act. Whatever the present moment contains, accept it as if you had chosen it. Always work with it, not against it. Make it your friend and ally, not your enemy. This will miraculously transform your whole life.”
― Eckhart Tolle