Traditionally mental illness had its influence from religion, philosophy, psychology and Medicine. There had been popular beliefs that mental illness was due to curse or inflicted by a vindictive spirit or an evil that haunts.
Can a mentally ill person get married? Can she or he beget a child? Mental Illness is of course not one category. There are many subdivisions. There are mild forms which do not have any major genetic load to inherit.