This sounds like obsession here especially since it hurts so much and this isn't good. Youre feelings for him are controlling your life here so much that you will do stupid out of the ordinary box that's you. Coming on too strong will chase him away guaranteed so you need to calm down and be fine with being friends but you may have already scared him off here. Guys don't like women who come on too strong and express their feelings and I suspect that's what happened here. Now be patient and let him make the next move but he may no longer be all that much into you anymore here so be prepared and learn from this and never ever get too obsessed with any guy . Good luck
I like someone, and I don't know what to do. He said we should be friends, I'm okay with that, but lately, he hasn't wanted to talk to me as much?
Probably good that happened. The way you are feeling you leave yourself open to used and abused.