it's def hard, it will a very long time to heal. But once you get over this learning phase it’s easier to analyze why you were wrong. It’ll be easier if you blame yourself instead of the other person because thinking about the past will only hurt you more.
I have been in your situation before, multiple times, and I know that it can be hard at first, but you will eventually get through it. One of the things that helped me the most was to find a new, better friendship, with someone else. Someone better. Focus on all the bad times that you had with the other person. Like, for example, a time where they called your favorite celebrity untalented or something like that. Make new friendships, but also take some time to let out what you're really feeling because ignoring your emotions is a very unhealthy thing to do. You will get through it! If you lose something good, something better will always come your way! Keep that in mind.