Twisted Mentats were Mentats who originated from the planet Tleilax. They were different from normal Mentats in those characteristics nonessential to pure computational ability. These variations took the form of body structure, emotional nature, and psychological make-up, depending upon customers' orders. Mentats produced by legitimate schools were also bred with certain characteristics in mind, but these were relatively benign in comparison to the Tleilaxu machinations and not the result of genetic engineering.
Mentat training tended to capitalize upon and benefited from the individual’s natural characteristics. It was the standard practice of the legitimate Mentat schools to select admirable individuals as students. Tleilaxu Mentats were a separate breed, displaying artificially produced characteristics. That these traits were often odious said as much against the Tleilaxu as against the Great Houses who were Bene Tleilax supporters.
Presumably, the Bene Tleilax did not lack customers, and it is likely that there were numerous twisted Mentats during the days of the Imperium. A notable one was Piter de Vries, an effeminate, psychopathic killer in the employ of House Harkonnen under Baron Vladimir.
Since the Mentats produced by the Tleilaxu were so often warped and bizarre in nature, they came universally to be regarded as objects of repugnance. However, this is probably merely a societal taboo rather than a real stigma as their skills were in demand. That they were trusted with the secrets of great houses does suggest that their psychological problems did not extend to being untrustworthy. It's certainly unlikely that someone as perceptive as Vladimir Harkonnen would confide anyone that was likely to betray him, and definitely not in a madman.
However, in the novel Children of Dune, the ghola-Mentat Duncan Idaho suggested that the "twisting" was a "hoax" maintained by the Tleilaxu. Potentially the twisted mentats were expelled pupils from legitimate schools, forced out for not living up the schools ideals then recruited by the Tleilax and re-trained to emphasise the negative sides of their personalities. According to Idaho, the twisting was very fragile, and twisted Mentats still maintained their own selfdom and dignity, refusing to be absolutely controlled by the Great Houses that bought them.