As someone who did get postnatal depression... no.
You can't ward off a chemical imbalance in your brain caused by hormones and trauma and exacerbated by stress and sleepless nights with a friend coming round for play dates.
You're getting yourself worked up over something that might not happen, but you're making demands of your friend to prevent it.
Firstly, she, and no one else, cannot change how your body responds to the huge change that will happen.
Secondly, it isn't fair on her to put that pressure on her.
PND isn't being a bit sad, or stressed. It isn't cured by someone coming round to clean the kitchen whilst you shower or going for a coffee date.
If you are unfortunate enough to experience it, your friend MAYBE not being there to support you is the LEAST of your concerns.
You cannot plan for PND other than to make your midwife aware you think you are high risk. They will help point you in the direction of the services you need.
You ARE entitled to help. But that's why the services exist. That's why charities exist. Your friend is NOT your mental health safeguard.
And if your friend decided (as an adult is entitled to do) that she won't offer the same level of support she does to another friend... what's unfair? She has her reasons. Maybe that friend has troubles you don't know about. Maybe she's already driving past her house to go to somewhere they'd both plan to go anyway. Maybe she just enjoys her company more.
You'd be better off having a grown up conversation with your friend about what she wants to do when baby is here. Then one with partner about your needs. Then one with as many health care providers and services and charities as it takes until you build up the 'village' you need.
Edit: spelling