That was expected. The signs were there.
Well, I'll just tell you this. He has loved you the best he can,
but situations were not in your favour. Take your time to recover
from it. Don't worry too much about it, you'll find the right one
for you in 4 years 
and yes, i think you and him should stay friends...if thats
possible with you.