A year ago I was in the same situation. I'd been praying really hard about the relationship almost from the beginning - not even specifically that it would work out, just basically thanking God for him, and asking that we would treat each other right and that God would make His will clear soon - and had asked others to pray as well. I honestly thought for a while that he might be "the one" - so many things seemed right on, especially at first. But he wasn't, and I can't deny that the breakup really hurt.
I've concluded since then that He had lessons for me to learn that I couldn't have learned any other way than through dating and losing this particular man. For reasons none of us understand, God allows His children to suffer pain sometimes, even when they are earnestly trying to follow Him. But I still don't believe I was out of His will, or sinning, by dating a man He didn't intend for me to marry. I honestly believe God wanted us to date for a while, for reasons of His own. I think the fact that I prayed about it, and that we dated with integrity, was pleasing to Him, regardless of the final outcome.
Don't get me wrong - I'd never date a man I knew I wasn't going to marry - there would be no point. But somehow, the fact that *GOD* knew I wasn't going to marry him, even if He didn't let *ME* in on that tidbit of information, makes it OK. I finally realized it was a matter of faith - could I still trust God even when things didn't make sense and weren't going my way? It's easy to do when everything's great, but it's another matter to say "OK, God, I don't get this AT ALL, but I believe You are still in control, and I choose to keep trusting You."
One last thing: People may try to tell you that you are suffering pain because you sinned somehow - that if you had TRULY been in God's will you wouldn't be going through this. Sometimes that's true, but not always. Just remember that those are the things Job's friends told him, and God was pretty clear at the end of the story that they were way off base!