In my opinion I don't think you should tell him at all.. things will just get more complicated. If you're close with him then maybe start to detach yourself a bit, eg: only let him text you first or avoid meeting up with him/being with him in general when it's just you two. This may be hard but it'll help you see that you're cool without him. Try and focus on the other good friendships you have; at least until this passes.
It's quite probable that you've idealised him - you've focused on his good qualities which have clouded over his bad characteristics. It's called 'the halo effect.' Maybe think of things about him which your not so keen on and that could help deter you. I myself am going through something kind of similar in which a guy I like is obviously wrong for me and kinda a jerk, and yet I still find him attractive but don't want to. I've found not leading him on (aka flirting) and not making him feel like he's any more special than any other guy is helpful (sounds harsh but might work). Your situation sounds quite different but still relatable.
Also, you need to have reigns on your mind. If you're imagining what it would be like with him or having fantasies or whatever then this is NOT HELPFUL at all. Whenever you start thinking about him try and distract yourself or at least don't encourage those thoughts.
PS: is there any girly friends or someone close you could talk to about it? this would be ideal so you feel less trapped, sometimes just saying stuff aloud helps you see them clearer and not as much of a big deal. Another thing, are you the older one or the younger one between you?
Hope this helps in any way, just remember it will pass, try not to worry