Our Gemara on Amud Beis quotes a verse in Shir Hashirim (4:7):

כֻּלָּ֤ךְ יָפָה֙ רַעְיָתִ֔י וּמ֖וּם אֵ֥ין בָּֽך     

Every part of you is fair, my darling, There is no blemish in you.

There is a Midrash (Shir Hashirim Rabbah 4:7) on this verse which elaborates on the idea of no blemishes. The verse is referring to the Jewish people at the time of the giving of the Torah:

באותה שעה לא היו בהם לא זבים ולא מצורעים ולא חגרין ולא סומין ולא אלמין ולא חרשין ולא שוטין ולא שממין קז ולא טפשין ולא חלוקי לב

At that moment there were in their midst neither zav, nor leper, nor lame, nor blind, nor mute, nor deaf, nor imbecile, nor depressed, nor fool, nor persons with a divided heart.

There is a textual problem with this list of blemishes. Every item enumerated has some physical or psychological disorder, except for חלוקי הלב persons with a divided heart. This term does not repeat itself in other Midrashic literature; it is a uniquely found here. This does not seem to be a physical or psychological blemish or Illness. Torah Temimah (Op. Cit.) is troubled by this and offers what seems to me to be a forced answer. He says that at the time of the giving of the Torah, if a person was not joined at heart with his brothers in full intent, it was tantamount to a physical deformity. Eitz Yosef translates “divided heart” as having doubts about the truth of the Torah. Regardless, I believe we need a better explanation of “divided heart”, and how this adds up to a physical blemish and disorder.

Sigmund Freud postulated the idea of unconscious conflicts and how they cause psychological dysfunction. According to Freud, a person’s psyche consists of drives and impulses that have to be moderated by the Ego and Superego, that is the basic needs to conform to practical reality and the higher needs of moral and social reality. So for example, you see a chocolate cake in the bakery store window. Your instincts and drives, (called the Id), would just break the glass and grab the cake. Your ego will consider the dangers to self of smashing the glass and if it is even the most practical and best way to gratify this instinct.  Maybe walking in, waiting on line, and paying $5 is a more likely way to actually have your cake, and eat it too. The superego will consider broader issues, such as if it is healthy or gluttonous to just gobble the cake up.

In a balanced personality, the person’s Id, Ego and Superego are in a healthy dialogue. No instinct is overly suppressed nor overly indulged. This is much like Aristotle’s Golden Mean and the Rambam’s description of balanced Middos in Hilchos Deos chapter one. In an unbalanced personality, a person might be in a state of unresolved conflict which leads to acting out either on the overly indulgent side or the overly repressed side. Let’s discuss a practical example so you can see how it works:

Plony comes into my office because he has an anger management problem. He tries to control his temper and succeeds most of the time. Every now and then, he blows up and goes on a rampage, wreaking emotional havoc and terror in his family and intimate life. 

If we took a deeper look, Plony might discover that he has a belief that “good people don’t get angry.” He unconsciously is constantly suppressing even normal expressions of anger because he wants to please his father (who, by the way, could be long departed from this world.  Like the spiritual world, in the emotional world, time and space do not exist.) But, another part of him resents being controlled, and perhaps even more deeply, resents his father for controlling him too much. He is too terrified to own these feelings consciously, because as a child it was dangerous to disobey his father. This is a deeply rooted aversion that remains fixed even in his adulthood. He is doomed to loop between suppressing anger and then exploding at the worst time and in the worst manner. His two parts inside of himself need to make peace and actively negotiate a better relationship with reality. Sometimes you need to express your anger, and other times not. To know when and how, involves a healthy internal dialogue, which leads to sound judgment based on a more compatible relationship with inner and outer reality.

Of course this is only one example. Each person has different kinds of unresolved conflicts and copes with them differently. It could be about religion, money, love and hate or any other human experience. The point is that a healthy person is not heavily conflicted and is able to negotiate these inner needs and drives in relation to self and other. To not have this worked out is indeed a blemish. I believe this is what the Midrash means by חלוקי הלב a divided heart.