The answer differs from country to country. In the USA, According to federal law, individuals cannot buy a gun if a court or other authority has deemed them as “mentally defective” or committed them involuntarily to a mental hospital.