And who is to say if a person is fit to gamble or not? You? The casino manager? Are they going to hire a psychiatrist to decide? How are they going to make someone undergo examination? There's no law saying they have to agree to it (at least in the countries that I know). IMO trying to ban such people is pointless because they'll go to your competition and eventually to an online casino.
The law is fain regarding this. If a person is deemed unfit by the court, they're going to be banned, but for that either the family has to file a motion, or he has to get arrested by the police for unlawful behavior, so if he's calm, the casino would have to provoke him somehow to get him to become violent.
I believe it would be possible. In developed countries there are complete databases which hold information on the people who have gone through mental institutions, for example. It would be matter for those basa bases to the shared with the staff of the casino and uploading the information in real time. Though, there would be still serious problems in that hypothetical system: people may feel their privacy and their rights are being violated by the government and the casino and also, that system would not stop someone from engaging with gambling in other unregulated markets... They could still gamble or bet with their friends or family, or even with strangers who could meet in secret places to bet on fights or races.
It would not take the casinos to hire extra staff to evaluate anyone,.to be honest, the government could provide all what is needed, though, I would continue to believe it would not be effective.
A person who was released from a mental institution should be healthy and fit to interact with the society, which also includes gambling. In many countries going through person's medical records is not allowed and you can't ban them from entering a casino or something because they used to be incarcerated, held in a mental institution, or are currently being treated.
If they started having access to a medical database, what's stopping them from banning you from the casino because you have HIV, or something. We'd come to a point where stores would put up signs that they don't serve people who once had a mental breakdown, or epilepsy...
It's not that people MAY feel their rights are being violated. If that happens, they are being violated, that's a fact, which makes it impossible to instate in freedom oriented countries. Maybe China will one day do something like that, they're known for crazy ideas and privacy means nothing there.