A Commentary, Critical, Practical, and Explanatory on the Old and New Testaments, by Robert Jamieson, A.R. Fausset and David Brown  at sacred-texts.com
psa 30:1Literally, "A Psalm-Song"--a composition to be sung with musical instruments, or without them--or, "Song of the dedication," &c. specifying the particular character of the Psalm. Some suppose that of David should be connected with the name of the composition, and not with "house"; and refer for the occasion to the selection of a site for the temple (Ch1 21:26-30; Ch1 22:1). But "house" is never used absolutely for the temple, and "dedication" does not well apply to such an occasion. Though the phrase in the Hebrew, "dedication of the house of David," is an unusual form, yet it is equally unusual to disconnect the name of the author and the composition. As a "dedication of David's house" (as provided, Deu 20:5), the scope of the Psalm well corresponds with the state of repose and meditation on his past trials suited to such an occasion (Sa2 5:11; Sa2 7:2). For beginning with a celebration of God's delivering favor, in which he invites others to join, he relates his prayer in distress, and God's gracious and prompt answer. (Psa 30:1-12)
lifted me up--as one is drawn from a well (Psa 40:2).
psa 30:2healed me--Affliction is often described as disease (Psa 6:2; Psa 41:4; Psa 107:20), and so relief by healing.
psa 30:3The terms describe extreme danger.
grave--literally, "hell," as in Psa 16:10.
hast kept me . . . pit--quickened or revived me from the state of dying (compare Psa 28:1).
psa 30:4remembrance--the thing remembered or memorial.
holiness--as the sum of God's perfections (compare Psa 22:3), used as name (Exo 3:15; Psa 135:13).
psa 30:5Relatively, the longest experience of divine anger by the pious is momentary. These precious words have consoled millions.
psa 30:6What particular prosperity is meant we do not know; perhaps his accession to the throne. In his self-complacent elation he was checked by God's hiding His face (compare Psa 22:24; Psa 27:9).
psa 30:7troubled--confounded with fear (Psa 2:5).
psa 30:8As in Psa 6:5; Psa 88:10; Isa 38:18, the appeal for mercy is based on the destruction of his agency in praising God here, which death would produce. The terms expressing relief are poetical, and not to be pressed, though "dancing" is the translation of a word which means a lute, whose cheerful notes are contrasted with mourning, or (Amo 5:16) wailing.
psa 30:11sackcloth--was used, even by kings, in distress (Ch1 21:16; Isa 37:1) but "gladness," used for a garment, shows the language to be figurative.
psa 30:12Though "my" is supplied before "glory" it is better as in Psa 16:9, to receive it as used for tongue, the organ of praise. The ultimate end of God's mercies to us is our praise to Him.