Psalm 40:7 Then said I, Lo, I come: in the volume of the book it is written of me,
Psalm 173 Thou hast proved mine heart; thou hast visited me in the night; thou hast tried me, and shalt find nothing; I am purposed that my mouth shall not transgress. 15 As for me, I will behold thy face in righteousness: I shall be satisfied, when I awake, with thy likeness.
Most of the Book of Psalms is the Servant David speaking. He is greatly afflicted by God for living a life of sin. His bones are vexed, and his friends go away because they see him without (loses his money) and all kinds of other horrible things happen to him. But he does have a dream of the Lord Jesus found in Psalm 17. Other books also mention this dream like the Book of Isaiah. Isaiah 26:9 to be exact.
Isaiah 269 With my soul have I desired thee in the night; yea, with my spirit within me will I seek thee early: for when thy judgments are in the earth, the inhabitants of the world will learn righteousness.
Psalm 893 I have made a covenant with my chosen, I have sworn unto David my servant, 4 Thy seed will I establish for ever, and build up thy throne to all generations. Selah.
Psalm 13210 For thy servant David’s sake turn not away the face of thine anointed.
22 My God, my God, why hast thou forsaken me? why art thou so far from helping me, and from the words of my roaring? 7 All they that see me laugh me to scorn: they shoot out the lip, they shake the head, saying, 8 He trusted on the Lord that he would deliver him: let him deliver him, seeing he delighted in him. 13 They gaped upon me with their mouths, as a ravening and a roaring lion. 16 For dogs have compassed me: the assembly of the wicked have inclosed me: they pierced my hands and my feet. 22 I will declare thy name unto my brethren: in the midst of the congregation will I praise thee. 25 My praise shall be of thee in the great congregation: I will pay my vows before them that fear him. 27 All the ends of the world shall remember and turn unto the Lord: and all the kindreds of the nations shall worship before thee.
Psalm 18 I will love thee, O Lord, my strength. 2 The Lord is my rock, and my fortress, and my deliverer; my God, my strength, in whom I will trust; my buckler, and the horn of my salvation, and my high tower. 7 Then the earth shook and trembled; the foundations also of the hills moved and were shaken, because he was wroth. 8 There went up a smoke out of his nostrils, and fire out of his mouth devoured: coals were kindled by it. 9 He bowed the heavens also, and came down: and darkness was under his feet. 15 Then the channels of waters were seen, and the foundations of the world were discovered at thy rebuke, O Lord, at the blast of the breath of thy nostrils. 16 He sent from above, he took me, he drew me out of many waters. 19 He brought me forth also into a large place; he delivered me, because he delighted in me.