In this verse and in the next verse, the author returns in thought to the previous situation of his distress. We understand this verse in such a way that the author first expresses that he continues to believe; and while trusting in God, he then says: I am greatly afflicted.
He indicates in this way that the affliction does not have the final say, the last word belongs to the Lord. In this sense this text is also being quoted by Paul in 2 Corinthians 4:13. In that passage, Paul writes about the suffering he must endure as an apostle; but he trusts that the Lord, despite the suffering, will fulfill his plan of the proclamation of Jesus Christ.
10 I believed, even when I spoke: “I am greatly afflicted”;