Well if he told you friendship that could be the reason, but if you want to know for sure you could look into Skrying or other forms of divination such as tarot or Oracle cards.
To make things better depends on what you mean, better friendship wise you could try a spell to help you move on, meditate and come to terms with the situation, or tell him you need time to yourself to clear your mind.
If you want him back, we all know love spells are morally wrong, but a love spell, or talking with him are options.
If I were you, I would sit, breathe, and look within for the answer. Emotions are running wild right now, so it might take a few weeks of alone time and self reflection to come to an answer, but once you get it, sit down and speak with him. In this situation magick shouldn't factor in, because magick for love doesn't normally go well.