Please try not to take it too hard. His actions are his actions, his opinions are his, and he is entitled to them. And he is also entitled to the possibility of being wrong. Hey, at least he did tell you how he felt, not face-to-face, true, but at least he did not pretend.
Just keep working on yourself, and good, genuine people, both men and women, will come into your life. It is the law of attraction.