When I was pregnant with my first child (due in a few days), my best friend went into premature labor (at six months) during her 2-year-old son's birthday party. We took the little boy home with us while her DH took her to the hospital. The DH called us a little after midnight to say that their little girl was born but had only lived a few minutes. He needed us and wanted us to come.
We called another friend who knew all of us and the little boy, who kindly let us drop him off at around 1 a.m. so we could go to the hospital to comfort our friends. We were all so sad, but just being there helped them, even though we didn't really do anything but let them talk or not talk.
On the morning of their daughter's funeral, I had to go to the hospital instead to have my own baby. I hated that I couldn't be there for my dear friend, but many people went to be with them. Later that day she came to see me in the hospital, and we cried together. Tears of joy for my baby, tears of sorrow for hers.
I think you just follow your friend's lead. Sending a card is a good idea. When she wants to talk, let her talk. When she doesn't, but wants you there anyway, just be there. You'll know what to do if you follow her lead.