I'm so sorry that your daughter and grandaughter are suffering so. This is a perfect example of how mental illness effects the entire family.
The task that lies before your daughter is a difficult one: it is important that she allow your grandaughter to have her feelings and empathize with her. In essence, she's "lost" a parent...she'll need her mom more than ever now. Your grandaughter should be encouraged to express herself and her feelings about the situation. There are no "bad" feelings. The process of grieving is a long and painful one...she may go from being very sad to very angry in a short period of time. Again, whatever she is feeling, she needs acceptance and she needs to know it's okay if she's hurt, angry, whatever. You can encourage her to talk about it, but at her age it may be difficult for her to find self-expression through words. She can also journal, draw, paint, do something physical...make sure she has plenty of ways to get her emotions out: even if she's not talkng about it, the feelings are still in there.
As much as is possible, your daughter needs to be honest with your grandaughter about the situation. She may not completely understand why her father has left and she certainly doesn't need to know all the details, but she needs to have some understanding as to why he left. Why? It is a child's nature to take on responsibility when something "bad" happens. Many children of divorce, for example, are plagued with thoughts such as, 'If I'd only kept my room clean, daddy would still be here' or 'It's my fault mommy left because I was a bad girl'. Although as adults we know these beliefs are irrational, a child does not have the ability to understand this. Again, she needs to be assured that she did nothing wrong, she's not bad, and that no matter what, her daddy loves her.
Your grandaughter's world has been turned upside down and, amongst other things, she may be feeling pretty out-of-control. Don't be surprised if she begins to "act out" with some bad behavior. If this occurs, your daughter needs to hold her responsible for the actions while keeping in mind that she may be acting out because she doesn't know how to express the feelings inside. Again, it will be important that your daughter provide her with many different ways she can get those feelings out (see above: drawing, physical activity, etc). Beyond that, she requires structure. There is a sense of safety in structure and routine. If they don't already have one, encourage your daughter to provide your grandaughter with a daily routine that is predictable. She's not up for anymore major changes right now, so movng, changing schools, etc, wouldn't be a good idea right now.
Finally, your daughter may want to consider taking your grandaughter to see a professional counselor. He/she can help ensure that your grandaughter doesn't become depressed and minimize the damage to her self-esteem.