First of all, you need to practice ride your mountain bike on gradual hills which will help you to develop a good control while maintaining your balance.
Riding bike on gradual hills will also help you to shift your body weight forward and backwards which will provide you with the enough control which will be required to go downhill safely.
Always use your rear brakes which will help you to maintain your control while going downwards and will also help in keeping your mountain bike stable.
Make sure you have a good control over the brakes and lightly press them in and out which is called fluttering. You should also know when to flutter the front brake and when the rear brake will be more effective.
Stay patient and relaxed and do not let the situation get panic. Keep your focus on the steep surface of hills which will help you to have a good control over your mountain bike.
Do not make your arms and legs stiffened because it will not help you in maintaining a good balance. Always keep your arms and legs loose which will help you to absorb the bumps very smoothly.
The most important thing you should do while going downwards is that keep your weight on the pedals of your mountain bike not on its seat. Also keep your body slightly back on a steep hill.
Try your best to keep the momentum of your speed in control and when you become comfortable, try to make use jumping technique which will keep your mountain bike away from jumps with little rocks.
Do not let mountain bike freely go downwards which will create problem in controlling it when required. Always control the speed while riding a mountain bike while going downhill.