(Verse 37.) And you will be confounded by Egypt, just as you were confounded by Assyria: for you will also go out from there, and your hands will be on your head: because the Lord has broken your confidence (or hope), and you will have nothing prosperous in it. In order to avoid the attack of the Egyptians, they fled to the Assyrians, whose defense was in vain, for we read that they were defeated by the Egyptians. Again, in order to escape the wrath of the Assyrians, they used the help of the Egyptians; whom the Assyrians overcame, as the history tells. Therefore, they are rebuked because, having abandoned hope in the Lord, they rely on the assistance of men, which is totally broken and so destroyed that they cannot find any usefulness in it. Hence it is said: 'And you shall leave this, that is, Egypt, just as you left Assyria; and your hands shall be upon your head, and you shall grieve in vain for having expected help from the Egyptians.' Let us remember the story when Thamar was corrupted and violated by her wicked brother Amnon, and she put her hands sprinkled with ashes on her head, and thus she returned to her house (II Kings XIII).
Our soldiers were brought low by a similar disdaining pride and by the same outcome. That saying of the prophet was brought home to our army: “The Lord shall cast aside your confidence, and you shall not have prosperity.” We were confident in our own wisdom and strength, contrary to the command of God, who says, “Let not the wise person glory in his wisdom or the strong person in his strength, but let him who glories glory in this, to know and understand me, because I am the Lord.”
[AD 420] Jerome on Jeremiah 2:37