Medical evidence should be required when applying for a gun licence after a man with a history of mental illness took his life, a state coroner says.