I know I'm extremely late to this discussion, but here are my thoughts on this. Keep in mind that I'm currently a Student Pilot as well, so I get how all of this medical stuff goes and all.
On religion: I think it's insanely close-minded and essentially anti-freedom to say that he should not have been a pilot, or have his details disclosed, because he was a Muslim. That's extremely uncalled for. Muslims did not cause terrorist attacks, terrorists do (in the same way that guns don't kill people, shooters kill people).
On suicidal tendencies: While it's debatable and some people will disagree, it's completely reasonable to let him fly after recovering from his suicidal tendencies. While it's not fool-proof (obviously), this allows pilots who would have been grounded for their lifetime to return back to doing what they love. Flying is the one thing that has helped me through many of my dark times because I enjoy it so much, so having pilots return can be a good thing. HOWEVER, this pilot should have seen a doctor, therapist, or spoke to someone about his depression and suicidal tendencies as soon as they resurfaced. He would have been grounded again, worked through the problems, and let back into the sky. It's simple; not fool-proof, but simple.
When I first heard of the accident, I refused to believe that the pilot would do such a thing. This tragedy is not due to improper laws regarding medicals and the Captain, but the law present in the United States that are not present in other countries that states there must be two or more people in the cockpit at all times. Normally, when a pilot must step out, they have to call a flight attendant to sit in with the other pilot, just to make sure something like this doesn't happen. We're going to start seeing these laws surface in other countries after this.