Too much generalization going on.
Mental illness is a term that covers a broad spectrum of conditions that interfere with an individuals powers of rational judgement.
This criteria includes substance dependancy, personality disorders, developmental disabilities, psychosis and compulsive behaviour. These are radically seperate problems and although it's easy to see how some of them could lead to one becoming ostrasized there are a couple on the list that virtually negate the possibility.
For example, an "industrial psycopath" is often a very difficult creature to pinpoint and expose because one of the classical traits of this character type is a ability to blend in and engender trust and popularity. In fact, the only thing that really seperates such a person from being a conventional member of society is a pathological disregard for the consequences that their decisions may heap on others. There is often speculation on whether or not this this is the mould from which many highly prosperous buisnessmen (media moguls corperate leaders etc) are cast.
On the other end of the scale, consider a Down's Syndrome sufferer, one for the sake of this topic that is a victim of the associated mental symptoms. Provided that their basic needs are facilitated by a caring benefactor, is there any concrete evidence that they are conciously lonely simply as a result of their condition?
The point I am stumbling towards is this, shouldn't the real question be; what types of mental illness can stem from loneliness and in turn, what type of behavioral problems lead to isolation? Finally of course, once the conclusions have been made manifest; what are the best steps towards solving these problems?