The same thing happened to me, I liked my best friend for over a year, I was subtle about it. No weird stalker stuff or anything. When she found out she freaked and didn't want to be my friend anymore. It was hard for me because she was my only friend- the kind of persn you'd trust your life with. My best advice to you is don't let him go. Try to give him some time to think it over and then talk to him about it. Maybe you can save your friendship at the least- I wish I had done that.
I'm gonna say that maybe he was just shocked and reacted badly, instead of being a bad person. If I knew someone for three years and found out that all through our friendship they'd wanted more, I'd be surprised too; it might feel like the friendship was somehow false, like you had ulterior motives while he was oblivious.
Anyway, I'd just give him some time to himself right now. If he's a good friend, he'll realise his mistake and the awkwardness and try to fix things. If he doesn't, just move on with your life as best you can - time fixes problems like this in the end.