Firearm Laws for New York
Rifles and Shotguns: A person who has been convicted of a felony or other serious offense may obtain a certificate of good conduct which will then permit him to possess rifles and shotguns.
I can't find documentation on the mental health issue, but I know Illinois sets the bar at 5 years for purchase or carry.
Here's california:
8103.
(f) (1) No person who has been (A) taken into custody as provided in Section 5150 because that person is a danger to himself, herself, or to others, (B) assessed within the meaning of Section 5151, and (C) admitted to a designated facility within the meaning of Sections 5151 and 5152 because that person is a danger to himself, herself, or others, shall own, possess, control, receive, or purchase, or attempt to own, possess, control, receive, or purchase any firearm for a period of five years after the person is released from the facility. A person described in the preceding sentence, however, may own, possess, control, receive, or purchase, or attempt to own, possess, control, receive, or purchase any firearm if the superior court has, pursuant to paragraph (5), found that the People of the State of California have not met their burden pursuant to paragraph (6).