The psalmist acknowledges that the Lord has “done good” or “treated him well” — though I think the psalmist is much less interested in “how” (well) God has treated him and more with “what” (good) God has done to him. Notice: “You have dealt well with your servant” (Ps. 119:65).
Time for us to ponder the “good” (Hebrew tov) God has done us. A good time of the year for us to ponder the good God has done for us. And this psalmist knew bitter experience, but when he looks back over his life he sees the “good” God has done to him.