Zechariah suddenly moves from describing the way God strengthens his people in battle to depict their response to wounding Someone. The reason why they are mourning is that they discover that he has been wounded while engaged in a battle on their behalf. They realise that the wounds he has were caused by them.
We can see from the words of the prophet that it is actually Jesus who is speaking through his servant. He says, 'They shall look on me whom they have pierced.' He does not say 'whom they will pierce', which means that from the perspective of Jesus the piercing is past. We know that he was pierced on Calvary (John 19:37), but in which period afterwards did those who pierced him live?
It could refer to the Jews that were converted on the Day of Pentecost. They had pierced Jesus in the sense that they had called for his death. Or it could refer to a future national conversion of the Jewish race, as described by Paul in Romans 9-11. More likely it describes the way people will respond to the gospel, with the experience of Jews depicting how all sinners will feel when they respond to the realisation that their sins were to blame for the death of Jesus.
It is important to note that it was the One who was pierced who poured out on the penitents the Spirit of grace and supplications. Peter on the Day of Pentecost said that the Spirit was sent then by the ascended, crucified Christ. When the Spirit comes in grace to sinners, the response from them will be pleas for mercy. We might expect them to have a great sense of dread about possible divine punishment, but instead they realise that the One they wounded wants them to cry for mercy to him.
The weeping will be very deep and bitter, like losing a child. It will also be very personal and each will mourn alone or with his family and with agonising repentance. While they are aware of the range of their sins, the aspect that affects them the most is that Jesus was wounded instead of them. So while it is weeping connected to their sins, it is also weeping connected to their gratitude to Jesus for taking their place and enduring God's wrath against them.
Adolph Saphir describes this look at Jesus: 'It is the look of repentance; for only a sight of the crucified Jesus shows us our sin and grief. It is the look of supplication and faith; for he only can bless and save, and he saves all who believe. It is the look of peace and adoration; for his love is infinite, unchanging and omnipotent. It is the look which never ceases and never ends; for now the veil is taken away, and we with open face, beholding the glory of the Lord, are changed into the same image from glory to glory.'
The outcome of the sacrificial death of Jesus is permanent cleansing from the effects of their sins for those who trust in him. So it is good for us to listen to the promises of Jesus through his servant Zechariah.