Ouch. That's always the worst, when someone gives you mixed or just plain wrong signals and then you fall in love and put yourself out there.
Please know that it happens to the best of us, it's a part of life, and that it's ok to feel bad, but don't feel bad about yourself. It's not you, it's him, and it just wasn't meant to be.
Odds are he won't change his mind. Even if he does, he probably won't treat you the way you want to be treated in a relationship. It will end up where he will dump you the first time someone more his tastes comes along, and it will just get even more hurtful and complicated.
Cry it out for a week, then refocus. Don't spend as much time together, because it will just hurt more. Resist the urge to make him feel guilty about it -- there's no point to that anyways. There's nothing you can or should change about yourself to make him love you, so please don't wreck who you are for him.
There are plenty of fish in the sea. I know this is hard to hear or believe, but I've been on this planet for a while, seen a lot of things, experienced some relationships, been dumped, did a lot of dumping, had crushes, been crushed on, etc. -- it's just part of life. You will find the perfect person for you, so don't force this one or hurt yourself trying.