To harden your heart is the work of the ego, which sees the person in need as fundamentally other, separate from you, a problem outside your life. The hardening feels like protection, but it is really a contraction, a shutting down of the life that wants to flow through you.
When you are present, something is revealed: the same consciousness that looks out through your eyes looks out through theirs. The one who suffers is not other than you; you are two forms of one Being. Feel that, and the hand opens by itself. You do not force generosity as a duty; it arises because you can no longer pretend the other's need is separate from your own.