It will take you a while to get your feet under you. Being hit with this type of situation is very difficult. It will be really important for you to lick your wounds, take a good look at where you are and then move forward.
Those first steps will be bumpy and it isn't easy, but it does get better. Even those who do not succeed in saving their M, I think for the most part would agree that the outcome was positive, having gone through "the work".