1 I will extol thee, O Lord; for thou hast lifted me up and hast not made my foes to rejoice over me.
2 O Lord, my God, I cried unto thee, and thou hast healed me.
3 O Lord, thou hast brought up my soul from the grave; thou hast kept me alive, that I should not go down to the pit.
4 Sing unto the Lord, O ye saints of his, and give thanks at the remembrance of his holiness.
5 For his anger kindleth against the wicked; they repent, and in a moment it is turned away; and they are in his favor, and he giveth them life; therefore, weeping may endure for a night, but joy cometh in the morning.
6 And in my prosperity I said, I shall never be moved.
7 Lord, by thy favor thou hast made my mountain to stand strong; thou didst hide thy face, and I was troubled.
8 I cried to thee, O Lord; and unto the Lord I made supplication.
9 When I go down to the pit, my blood shall return to the dust. I will praise thee; my soul shall declare thy truth. For what profit am I if I do it not?
10 Hear, O Lord, and have mercy upon me; Lord, be thou my helper.
11 Thou hast turned for me my mourning into dancing; thou hast put off my sackcloth and girded me with gladness,
12 To the end that my soul may give glory to thy name, and sing praise to thee, and not be silent. O Lord, my God, I will give thanks unto thee forever.
I'm pretty sure this is the one he wrote that mourned a stillborn child.
I especially love the latter half of verse 5: "Weeping may endure for a night, but joy cometh in the morning."