One of the big discoveries from cognitive psychology has been the dual processing model of cognition. Simply put, the dual processing model argues that human cognition operates through two distinct systems, called System 1 and System 2. System 1 is automatic, unconscious, and emotional. System 2 is deliberative, conscious, and logical. Daniel Kahneman has described the dual processing systems as "thinking fast and thinking slow."
The relevance of the dual processing model for spiritual formation concerns how we tend to assume that failures of virtue are System 2 issues when, for the most part, they are System 1 issues. That is to say, our failures of kindness or patience are not typically due to making bad moral choices. What happens, rather, in moments of hurry, stress, or irritation is that we act, judge, or speak uncharitably, harshly, or dismissively. The problem is with our rapid System 1 response.
For example, when I reflect upon my failures as a parent these weren't ever due to making a poor choice, deliberatively speaking. My failures were emotional in nature. Reacting out of anger or impatience.
That our moral failures are often System 1 issues presents a challenge for spiritual formation. How can you change or modify an automatic response?
Ponder how you learn a musical instrument or learn a sport. To play an instrument or learn to hit a golf ball you have to practice. Through repeated practice we acquire automaticity. Practice shifts System 2 control toward System 1. Deliberation becomes habit. What was slow becomes fast.
This, then, is the key to spiritual formation: We need practices that help us acquire holy automaticity. We practice until our kneejerk responses to life, our System 1 reactions, are virtuous. Jesus must become a habit.
Aristotle argues for this in the Nicomachean Ethics. Essentially, virtue is something we do, we can do it well or poorly, and just like anything else we do, we can be talented or untalented at it, we can better or more poorly trained at it, we can become more or less skilled at it through practice, and we can build, possess, and get rid of good or bad ethical habits. It’s specifically the habits you are speaking of here, because it is building good habits of virtue that makes it more likely that we will still be virtuous when we are tired, irritated, endangered, etc.
This is why I have found the spiritual disciplines so helpful - not as "I have to" but as a way to practice becoming more like the person I want to be.