David begged God not to let him be put to shame and not to let his enemies exult over him. To exult is to rejoice greatly in a jubilant way. David also wanted the treacherous ones to be ashamed because of his lifting up his soul to God, his trusting (confiding) in God, and his waiting on God (vv. 1-3). David's soul was down, so he lifted his soul upward to God. That means he looked to God.
David's begging God not to let him be put to shame and not to let his enemies exult over him belongs to the tree of the knowledge of good and evil, not to the tree of life. His asking God to let the treacherous ones be ashamed also belongs to the tree of the knowledge of good and evil.
Now we need to consider David's lifting up his soul to God, his trusting in God, and his waiting on God according to the context of Psalm 25. Does this belong to the tree of life or to the tree of the knowledge of good and evil? We cannot answer this question in a definite way because David sought God according to and in the age of the old covenant under the law. Today we are in the new covenant under grace. In the old covenant age, David's lifting up his soul to God, trusting in God, and waiting on God were very good, but they are not up to the standard of the new covenant. The standard of the new covenant is much higher than that of the old covenant.
David also asked God, as the God of his salvation, to teach and guide him through His compassions and acts of kindness (vv. 4-6).
David asked God not to remember but to forgive his sins, transgressions, and great iniquity (vv. 7, 11, 18b). This surely belongs to the tree of life because at the beginning of the New Testament there was a man telling people to repent (Matt. 3:1-2). The way for us to enter into the New Testament age is by our confession of sins plus God's forgiveness of our sins. This is the threshold of the New Testament age. We confessed and God forgave; then we entered into the New Testament age.