It's an awful story. He attempts suicide in March. Presumably he gets some sort of help, or maybe not. In either case, he then legally purchases a gun around April 17th (according to IMDb), and kills himself with it 15 days later.
As far as I know, background checks in CA are supposed to catch things like suicide attempts, but I don't know what the process was in 1990. Either way, he was granted a weapon that he should not have been allowed to receive. Was he even a US citizen?
Today, information is so instant, they could just do a quick database search and see that he wasn't ok. Back then, did they even have the waiting period for firearms? The information on his attempted suicide probably wasn't in his "file" so soon after the attempt was made.