If you feel that your actions are to blame this is your opportunity to be a better person. People come in and out of our lives, if you learn nothing from those moments together you are doomed to repeat your mistakes.
It sucks, you are going to be miserable for a while and hopeless that things can get better but one day the cloud over your life will rise and you better be paying attention for that moment that you can claim your life back and make something better out of it.