Passage
The righteousness of thy testimonies is for ever: give me understanding, and I shall live.
The righteousness of thy testimonies is for ever: give me understanding, and I shall live.
Psalms 119:142 Thy righteousness is an everlasting righteousness, and thy law is truth.
Psalms 119:143 Trouble and anguish have taken hold upon me: thy commandments are my delights.
Psalms 119:144 The righteousness of thy testimonies is for ever: give me understanding, and I shall live.
Psalms 119:145 KOPH. I have called with [my] whole heart; answer me, O Jehovah: I will observe thy statutes.
Psalms 119:146 I call upon thee; save me, and I will keep thy testimonies.
The verse centers on "righteousness", "testimonies", "ever", "give", "understanding", "shall", and "live". It is saying that the verse draws attention to "righteousness" and "testimonies", so its meaning should be read from those terms before moving to application.
The nearby context moves from verse 143's "Trouble and anguish have taken hold upon..." into verse 145's "KOPH I have called with my whole...", so "righteousness" and "testimonies" belong inside that flow. In Psalms context, the local focus is worship, trust, the LORD's kingship, and covenant mercy.
A plain takeaway is to answer the verse's own emphasis on "righteousness" and "testimonies" with trust shaped by these words, not by a vague optimism outside the passage.