I'm sorry that things didn't work out for you, but while it hurts that your relationship didn't last forever, please remember that your grieving process also won't last forever.
Don't torture yourself looking for answers or feeling at fault. It's also best to avoid your ex as much as possible. What you should do is take as much time as you can for yourself and just let yourself let it out. The feelings of emptiness and rejection are powerful and need to be respected. Also start removing any visible reminders of your ex from your home and surroundings, as well as setting social media updates from your ex to be not immediately seen, although totally blocking them isn't always wise.
Based on a survey and study conducted by the Journal of Positive Psychology, over 70 percent of a sample group of younger adults reported seeing emotional light after the storm around eleven weeks after a break-up. This is typically three months. Depending on where you live, this usually is long enough for a change of season.
The eleven weeks is an average, however. The only way to know you're really past it is when you're ready to start dating again, even if casually and minimally.