I just sent a card to a friend of mine for something similar. I put something like:

...It breaks my heart to see you hurting so bad. I wish that I could do something to make all the pain go away. I want to be there for you but I understand that you want to be alone right now. I just want to let you know that I am here for you when you are ready. If there is anything that I can do please let me know...