(Below are excerpts from Chapter 4 of Shmoneh Prakim by Rambam regarding generosity.)
Similar is generosity, which is the middle between stinginess and wasteful extravagance.
This is precisely what we must do for character traits. As an example to this, when we see a man whose condition in his spirit, through which he causes his spirit to be lacking from all [legitimate] good things due to abundant stinginess, this is a very bad defect of the spirit. Any action that he will do will be a bad action, as we explained in this chapter. When we will want to cure this illness, we will not order him to conduct himself with generosity [a middle trait]. This is because this will be like treating one who is overwhelmed with a serious fever with something of middle [strength], for someone whose health is balanced, which will not [be strong enough to] return him to health from his illness. Instead, we must bring him to scatter his money repeatedly with acts of extravagant squandering, time after time, very many times, until the condition which produces stinginess goes away from his spirit, and he will be close to reaching the condition of extravagant spending. Then we discontinue the acts of squandering and we order him to constantly do generous acts and to remain diligent regarding them, not to be more [towards recklessly extravagant] and not to be less [towards tight and stingy].
Similarly, when we see one who scatters money, we order him to do stingy actions and to repeat them. However, he must not repeat the acts of stinginess as many times as one must repeat acts of extravagance. This is an important innovative concept. It is a principle and a secret of healing, being that it is much easier, and it comes much quicker, for a person to turn from excessive squandering to generosity [the midpoint, the healthy trait] than for a person to turn from stinginess to generosity. Similarly, it is easier and quicker to come for a person to turn from being absent of feeling for pleasure to having balanced self-discipline together with fear of sin, more than turning from being uncontrollably and excessively lustful for physical pleasures to being balanced, pious and disciplined. In this, the one who has powerful drive to indulge himself with pleasure and gratification must repeatedly do acts which cause him to be absent of his pleasures. He must do this much more than the person who lacks feeling for pleasure must repeat the acts which develop his capacity to have pleasure. Likewise, we must require that the coward expose himself to risks more than we require the reckless risk-taker to soften his heart [to moderate his exposing himself to danger]. We will accustom the mean person with excessive goodheartedness more than we will accustom the one who is excessively kindhearted to become mean. This is the principle for healing character traits. Remember it.