Hello, I can see this must be very difficult and uncomfortable for you. (I'm a bloke, by the way.)
Trying to see why he'd do this, I think it must be that he wanted to see if you felt in the least bit similar. He must have known that it was a very risky strategy, with potentially everything to gain - or lose. Obviously, his fear of not being with you if he possibly could overcame his fear of the chilling effect on your friendship if he got this wrong. So he probably has overwhelming feelings for you.
And in that situation, what can anyone do? Say what we think, rather than facing a lifetime of regretting something that (erroneously in this case) could have been.
But a bit of a shock for you, I realise. How can you, frankly, behave as if nothing happened? He will still be looking for evidence that you're not sure, or that little tiny part of you is avaialable. Depending on how obsessive he is, that could keep him going for ages.
It will really, really hurt him but you just have to back right off and not be with him 1:1. Don't explain yourself or get embroiled in what he said to you, but you could perhaps just say that he's a valued/dear/lovely / whatever appropriate expression friend and are sure that in time he can find someone else to love. That's a kind thing.
This thread recalls one a few weeks ago in which a MNer was asking whether it was safe to have close male friends who were married or in a relationship.