A 76-year-old veteran committed suicide on Sunday in the parking lot of the Northport Veterans Affairs Medical Center on Long Island, where he had been a patient, according to the Suffolk County Police Department.

Peter A. Kaisen, of Islip, was pronounced dead after he shot himself outside Building 92, the nursing home at the medical center.

The hospital is part of the Veterans Affairs medical system, the nation’s largest integrated health care organization, which has been under scrutiny since 2014, when the department confirmed that numerous patients had died awaiting treatment at a V.A. hospital in Phoenix. Officials there had tried to cover up long waiting times for 1,700 veterans seeking medical care. A study released by the Government Accountability Office in April indicated that the system had yet to fix its scheduling problems.

Why Mr. Kaisen decided to end his life was not immediately known, but two people connected to the hospital who spoke on the condition of anonymity because they were not authorized to discuss his death said that he had been frustrated that he was unable to see an emergency-room physician for reasons related to his mental health. “He went to the E.R. and was denied service,” one of the people, who currently works at the hospital, said. “And then he went to his car and shot himself.”