The only thing you can do is ask her mom take her to another doctor, a psychiatrist would be best. But psychiatric meds aren't the best for 5 year olds. None are approved and some have warnings. They are used, however, at times.
I would amp up her physical activity as it releases endorphins, the body's happy chemicals. I'd get her involved in some way in helping others. It works wonders on mind and self esteem and helps us learn about taking care of others.
But as the grandmother, if the mom doesn't want to pursue anything---- you are kind of stuck. Good luck, must be hard.
I would look at your own depression and see what things besides medication helps you and start with those.
For me I have learned when I am not on medication I MUST work out for at least 1 hour each day plus I must have scheduled activities planned that forces me to get up, get dressed and do something structured. It may take some trial and error of finding some things that works well for her, and like the other person said, if the mother isn't on board it's going to be very difficult.