Is this a real photo from an abandoned mental hospital?

It is not. That’s Linda Vista Community Hospital, originally called the Santa Fe Railroad Hospital. After its closure, the hospital became a popular filming location for horror themed productions.
Further reading: Linda Vista: The Ruins of an Abandoned Los Angeles Hospital.