When your Mech is destroyed you run behind the rest of your team. You're weak, but your pistol does have some range to it. You should pepper the enemy team with shots (each shot SIGNIFICANTLY charges her ult) without taking any chances (Since it's only 30 seconds at most until you're able to suit up again).
To that end, here are the key points:
Try not to lose your mech when surrounded by the enemy team. Easier said than done, I know, but D.Va has great mobility. Try to make your mech last as long as possible by intelligently using her defense matrix.
You're vulnerable WHILE suiting up. Don't suit up in the open or in the middle of a fire fight.
Conversely, she has brief invulnerability when losing her mech. Try to get away ASAP.
She's a tricky hero, but she has a ton of control over when she engages and how she mitigates damage. You can extend her Mech's life and play conservatively (but not timidly) as a pilot to get back into your Mech.