Verse 18 states: "So I say, 'Gone is my glory and my expectation from the Lord". That is, like one who concludes in desperation. Also, like one who would claim: since I am amidst obstacles, and the Lord rejects me, He does not aid me. Again: "so, I say": within my heart, like a person in desperation. Thus, in conclusion is said: "Gone is my glory, and my expectation from the Lord".
Such states, as if: I do not accomplish what I had expected. And as Jeremiah 2:25 asserts: "But you said, 'It is hopeless, for I have loved strangers, and after them I will go.'" Also, Malachi 3:14: "You have said 'It is vain to serve God. What is the good of our keeping his charge or of walking as in mourning before the Lord of hosts?'"