Millions of dollars is being spent fencing off open sections of Melbourne's railways where people are regularly taking their own lives.

Suicide by train has become so common Metro plans to build a dedicated train wash, called a ''biopit'', to clean train exteriors after a person is hit. The bio-pit will cost an estimated $5.4 million to build.

Metro says a person is struck by a train more than once a week on average in Melbourne. Credit:John Woudstra

The secret plan to construct a specialised pit is revealed in confidential documents leaked to Fairfax Media. It will be built as part of a huge new train depot in Pakenham East, expected to open in 2019.

Rail operator Metro says a person is struck by a train more than once a week on average in Melbourne. Most are killed, some survive with terrible injuries.