You didn't lose a friend. A person you thought was your friend was exposed for what they really are. You can't lose something you've never had.
Being honest about who you are to your friends is never risky. You just have to be better at judging the character of people you let inside your trust zone.
All my friends know. Even the ones who aren't kosher with it. They just don't ask. There was a time a long while back when I thought this was some kind of well kept secret. All it needs is to sleep around for a while and then everybody knows... and then people will search you down for sex because they know.
I think the nugget of truth to take from this is that it's never good to share if it isn't welcome. Nobody can demand somebody to be understanding if they don't care. This was obviously so fucking far out for your "friend" that they couldn't handle it. The quicker this person is out of your life the better. But I guess that is already the case.
In my opinion you didn't loose anything from this. You gained valuable knowledge. There is a price to pay for all knowledge.
My 2 cents.