It is written: I have set the Lord always before me (Ps 16:8). Shviti ("I have set") is related to the word hishtavut ("sameness"). Whatever happens to a man, it should be all the same to him -- whether people praise him or insult him; and so for all other matters... No matter what happens, one should say: This comes from God; if He deems it proper to do so [then that is sufficient for me.]
Man's intentions should be solely for the sake of heaven. As far as he himself is concerned, however, there should be no difference to him. This is a very high degree [to attain]...
The Baal Shem Tov teaches that, having set God always before me, I should respond with equanimity to whatever arises. Whether someone praises me or insults me, whether the food before me is good or bad -- whether readers like my writing, or quibble with my interpretations; whether the text of my body is legible, or opaque to understanding -- I should acknowledge that God is the source of whatever is. If God is always before me, then I can find blessing in all things, even those which appear at first glance to be negative.
But if I school myself to simply accept whatever is, then will I lose my impulse toward improving anything, either internally or externally? I think the BeShT would say no; equanimity doesn't equal inaction. Lamm writes that with regard to oneself, one should cultivate this kind of studied indifference -- but one must always do what is right, helpful, and satisfying for the other, "for the sake of heaven." If one is occupied with devekut (cleaving to God), ego recedes...but dealing righteously with one another remains important, maybe because interactions with one another are one way we can approach God.
One of my favorite meditations on the Shviti is a four-line chant: "It is perfect / You are loved / All is clear, and / I am holy." (There's a beautiful black-and-white graphical rendering of it here, drawn by Morty Breier.) The four lines of the round can represent the four letters in the Name, and/or the four worlds.
How does equanimity manifest in the four worlds? In the world of assiyah, action and physicality, everything is perfect -- maybe not according to our limited understanding, but from God's point of view. In the world of yetzirah, emotions and the heart, we are loved -- as our liturgy reminds us daily. In the world of briyah, thought and intellect, all is clear -- all obstacles to understanding are products of mochin d'katnut, small consciousness, and not ultimately real. And in the world of atzilut, essence, God is all that exists.
In light of these teachings, the clamor of ego and the inclination toward gratification are simply things to notice and then release. If I keep God always before me, then equanimity naturally follows.