Commercial pilots in Europe should undergo psychological assessments as part of their initial training, or before they enter service with an airline say new recommendations from the European Aviation Safety Agency.
EASA also says they should undergo regular testing for drugs and alcohol, and never be left alone in the cockpit.
It was asked by the EC to report on the loss of Germanwings flight 9525.
The aircraft crashed into the Alps in March, killing all 144 on board.
The accident has been blamed on the co-pilot, Andreas Lubitz, who was in control of the plane at the time.
Evidence from the flight data recorders suggests that he crashed the plane deliberately.
The report was produced by a task force, consisting of 14 senior representatives from airlines, flight crew associations, medical advisors and authorities.
It points out that, although most pilots do undergo psychological evaluations as part of their initial training programmes, this is not always the case.
Some can begin flying commercial aircraft without ever having undergone one.
The report says in future such testing should be made mandatory for all pilots, and the psychological element of regular medical checks should be strengthened.
It adds that because the abuse of alcohol and drugs can potentially harm the mental health of pilots as well as affecting their ability to fly a plane, airlines should be compelled to introduce random testing.
Another controversial issue looked at in the report is data protection law. It says that "an appropriate balance" needs to be found between patient confidentiality and the need to protect public safety.
A database should also be set up to allow basic medical information about pilots to be shared, and there should also be a "robust oversight programme" to oversee the training and performance of aero-medical advisers.
The report also says that current EASA advice to airlines, which states that there should be at least two people in the cockpit at all times, should be maintained.
The so-called "rule of two" is not legally binding in Europe.
EASA's recommendation was issued in the wake of the Germanwings crash, and the policy has since been widely adopted..