Sure, restrict service members private firearms, that will solve everything. They would never use their issued duty weapon or any other means to kill themselves. Years ago, I was stationed in North Carolina where we had a pilot kill himself by activating his ejection seat while inside a hangar.
A better answer might be to encourage mental health treatment and not stigmatize it.