Federal law
Don't murder people (sorry I can't find the exact quote or statute).
Point is if the laws were actually followed we wouldn't be in this position in the first place.
The real problem is that it's hard to tell if someone has mental issues, and also hard to stop someone who has mental issues from "borrowing" a gun from a family member.
Also people can develop mental issues long after buying a gun.