Over and over again, the Yom Kippur services recite the verse from Exodus 34, HaShem HaShem, “The Lord, the Lord, powerful and compassionate, gracious, slow to anger and abounding in kindness and truth, extending kindness to the thousandth generation; forgiving sins committed deliberately, rebelliously or unwittingly, and acquitting the penitent”.
The Talmud (Rosh HaShanah 17b) recommends that whenever a person sins, they recite these words, and their effort will not be in vain. Not because the mechanical repetition of prayer texts has some automatic or magical effect, but by acclaiming God’s thirteen qualities we learn to emulate Him.
As He is compassionate, so we learn compassion. As He is patient, so we learn patience. As He is kind and forgiving, so we learn kindness and forgiveness.
The traditional enumeration of thirteen qualities in this passage requires us to attach a separate meaning to each mention of the name HaShem.
There are not two HaShems, of course. The Talmud (ibid.) says, however, that the first reference to HaShem is before we repent; the second is after we repent.
Perhaps what this suggests is that before repenting, we should not despair of God’s forgiveness and say, “What I have done is so bad that He will never forgive me!”
After repentance, we should not exploit His good nature and say, “I sinned and repented and He forgave me. Now I can sin again and I will be forgiven again!”