I'm really sorry that what he said hurt you. I know it hurts when people we care about, especially people we trust and are vulnerable around, turn around and say something that hurts so deeply. Its hard to trust and to let down our guard, and then to feel judged or attacked or whatever else makes me feel like retreating back into bed and not coming back out. ever.
hopefully you can talk to him about it. and go easy on yourself. we all have hangups about one thing or another, and we all have different ways of seeing things. however you are, whoever you are, its good and its enough.
I guess this is growing up.