It's best to see Jesus' weeping within the context of John's water motif. Though John doesn't use the word water here, several elements indicate he saw in Jesus' tears the healing water welling up within the Son of Man.
John's Water Motif
Water is an important core symbol within the Gospel of John.
- John the Baptist states three times that he baptizes in water (1:26, 31, 33)
- Jesus turns water into wine (2:1-10)
- Jesus tells Nicodimus he must be born of water and the spirit (3:5)
- John baptizes at Aenon near Salim because “there was much water there.” (3:23)
- Jesus promises the woman by the well living water (4:4-28)
- The lame man can;t get healed in the troubled waters of Bethesda (5:7)
- Jesus walks on water (6:19)
- Jesus invites the thirsty to come to him and drink (7:37-39)
- Jesus heals blind man in pool of Siloam (9:6-7)
- Jesus washes his disciples feet (13:4-5)
- Water flows from Jesus'pierced side (19:34)
In the early water scenes, John defines two waters, an earthly water used in ritual and tradition and a heavenly water, symbolizing the Spirit, offered by Jesus.
- John says Jesus' baptism in the Holy Spirit surpasses his baptism in water (1:19-34).
- The headwaiter says Jesus’ “water-turned-wine” is better than the choice wine/water which came before (2:1-11).
- Jesus says his "living water" is greater than the water of Jacob's well (4:4-26).
- Jesus’ healing is more effective than the troubled water in the pool of Bethesda (5:1-9)
- Jesus implies that his “living water” is greater than the water in the feast's water ceremony (7:37-39).
See my answer to What does it mean to be born of water? for more.
A Spring Within
But Jesus offer of "living water" leads to an imporant question. The Samaritan woman recognizes that Jesus has no physical means to draw from the external well. She asks, "Where can you get this water (4:11)"? Jesus responds by telling her its an internal spring.
The water that I will give him will become in him a spring of water
welling up to eternal life. (4:14)
In the later half of John, the narrative increasingly focuses on Jesus' body as the primary source of this spring of living water. Christ’s invitation to the thirsty in John 7:38-39 likewise describes Jesus' body as the source of living water.
On the last day of the feast, the great day, Jesus stood up and cried
out, “If anyone thirsts, let him come to me and drink. Whoever
believes in me, as the Scripture has said, ‘Out of his heart will flow
rivers of living water.’” Now this he said about the Spirit, whom
those who believed in him were to receive, for as yet the Spirit had
not been given, because Jesus was not yet glorified.
It's important to note the ambiguity in the Greek here. The Scripture, 'Out of his heart will flow rivers of living water' may refer to the believer as the flows source as it does in John 4:14 and it may refer to Jesus as the source because it points to the climatic flow of water from Jesus' side in John 19:34.
But one of the soldiers pierced his side with a spear, and at once
there came out blood and water. (19:34)
While a promise of an internal spring is given to beleivers, it is from Jesus' body that the narrative depicts a literal secretion. Jesus' body is both like and unlike Jacob's well and the pool of Bethesda. He is a literal container of the heavenly water.
The Water Welling Up Within Jesus
And the flow of water in John 19:34 isn't the first time John points to the water welling up within Jesus. We see this climatic flow forshadowed in two previous scenes. The first is found in Jesus' healing of the man born blind.
Having said these things, he spat on the ground and made mud with the
saliva. Then he anointed the man’s eyes with the mud. (9:6)
The second is found in the weeping of Jesus in John 11.
The first indication John wants us to see the heavenly water in this occurence is the word used for Jesus' weeping. In John 11, the reader is confronted by a number of people weeping.
When Jesus therefore saw her weeping, and the Jews who came with her
also weeping (11:33).
But the word used for Jesus' weeping is not the same word used for theirs. The word used for the women's weeping is κλαίω. It means to “wail and moan.” δακρύω, the word used for Jesus' weeping on the other hand, means to "shed tears." It is the watery tears of Jesus that John wants us to see.
The second indicaiton John wants us to see in these tears the heavenly water is the word used for Jesus' emotion. John 11:33 states,
Jesus was deeply moved in spirit and was troubled (ταράσσω).
ταράσσω only appears a few times in John. Later, we find it used of Jesus' emotions in John 12:27, 13:21, 14:1 and 14:27, all of which surround the coming hour of his glorification. The word is only used one time prior to Jesus distress at the tomb of Lazarus. In John 5:7, the lame man responds to Jesus,
Sir, I have no man to put me into the pool when the water is stirred
up, but while I am coming, another steps down before me.
The Greek word which the NAS translates as "stirred up" is the same word used for Jesus troubling in John 11:33.
It appears like the healing waters of Bethesda in John 5, Jesus, himself, is being stirred up. The tears which flow from his eyes are a demonstration of the divine water that is overflowing within. But this time, unlike Bethesda, the healing water is going to the impotent man.