Want Shalom Bayis? Be a Tzaddik

I translate the Chida we once quoted on Hyehudi with source:

התלמיד חכם כפי מה שמתנהג הוא עם הקב”ה כן אשתו מתנהגת עמו. וזהו סוד מה שאמרו רז”ל זכה עזר לא זכה כנגדו, שמורדת בו כמו שהוא מורד בקונו.

וזה הסוד לא שייך אלא לצדיקים. ולזה, כל בן תורה שאין אשתו נשמעת לו אין ראוי להתרעם עליה כי איהו דאפסיד אנפשיה. אמנם אם אינו בן תורה, דרך טבע אשתו נשמעת לו מפני שהיא יראה ממנו.

The wife of a Torah scholar treats him the same way he treats God. This is the mystical meaning behind the saying of our sages, “If he merits, a ‘helpmate‘, if not, ‘against him‘. That is to say, a wife rebels against her husband as he rebels against his Maker.

But this mystical mode applies only to the righteous. Thus, a Torah student whose wife does not obey him ought not to be angry at her, since this is all his own doing. But if one isn’t a Torah student, his wife will typically obey him, due to fear.

(Of course, the Chida is based on the Ari, and no translation is perfect.)

See also the Netziv.