A husband and wife – distraught because they had no place to live – tried to kill themselves yesterday by jumping in front of a Long Island Rail Road train, police said.

John Jansen, 48, and his wife Linda, 45, were waiting at the Lindenhurst LIRR station just before 4 p.m. when stunned witnesses saw them “link arms and jump in front of the train” on the westbound track, said Suffolk Detective Sgt. Kevin Cain.

“It was a suicide pact,” said Cain.

The train made an emergency stop and police and rescue personnel rushed to the scene.

Both husband and wife went under the train, but apparently Linda Jansen was knocked under the platform, which may have saved her life.

She was taken to a nearby hospital, where she was reported in stable condition.

Her husband, who was pinned under the train, suffered critical head injuries and was airlifted to Nassau University Hospital, where he was reported in critical condition.