Investigators have concluded that pilot Andreas Lubitz locked the captain out of the cockpit and deliberately flew the Germanwings A320 jet into a French mountainside on March 24, 2015 on a flight from Barcelona to Duesseldorf, killing all 150 people on board.
Prosecutors have said Lubitz was suffering from a mental disorder with psychotic symptoms that led to suicidal thoughts but he had concealed his illness from his employer, part of the Lufthansa group.
The new rules seek to prevent a similar tragedy by providing all pilots with access to a support programme in case of mental health problems and by making European airlines perform a psychological assessment of pilots before they start work.
Pilots are already subject to annual medical checks but these have not routinely included a full mental health assessment.
Random alcohol testing for all European airlines and those foreign carriers which fly into the European Union will become mandatory, while flight and cabin crew will also face more testing for psychoactive substances.
The rules are based on safety recommendations made by the European Aviation Safety Agency (EASA).
"With these rules Europe introduces the right tools to safeguard the mental fitness of air crew," EASA executive director Patrick Ky said in a statement.Airlines and EU member states now have a two-year transition period in which to implement the new rules.