Titles and leading verses are very important in biblical poetry as they often set the tenor of the entire passage. David in ascribing a title with meaning to psalm 30 gives us the impression that it is a happy psalm, about rejoicing and praise. While in Psalm 6 we are convinced he is in a deep depression due to al lhis ailments and woes.
But in truth, while psalm 30 begins with a rejoicing 'sing a song dedicating the house''motif and then proceeds to an upbeat first verse 'I shall praise the Lord for He drew me up, it neverthless bears a striking resemblance to the downtrodden David of psalm 6. Both have David going through a variety of ailments--some physical, some emotional, external as well as internal spiritual; both have words like 'sheol, bechi' and perhaps most significantly, 'behala'! Both offer a claim from David saying to God that he is of no use to Him dead, and both see David calling out to God and realizing that his sin has brought him to this unforutnate position.
The difference between the two, however, is how one presents one's predicament. In Psalm 6 it is all sadness, depression, desperation and helplessness. It begins with a desparate call to God not to rebuke him but instead to shine His light and show grace to David, and from there it describes all the frightening and torturous conditions. The redemption is far off, and the only moment of solace comes when he acknowledges that God has heard his cries.
30, on the other hand, shares a different angle. It begins and ends (in inclusio form) with a call of praise to God (in a somewhat chaistac structure with abba--I shall praise God...God my Lord I shall eternally praise and thank. With these two bookends the psalm introduces all the requisite fears of the king--his enemies from without and within, his psychological worries and his physical ailments. 30 gives us more of a 'recalled in tranquility'perspective without us having to feel bad from the getgo. It seems as if David is teaching us to engage in introspection regarding our own existential and metaphysical state. Determine for ourselves if we truly are in a state of despair stemming from a deep depression or perhaps we are suffering from our sins and the repercussions. In which case the forumla in psalm 6 is clear--God can help us raise ourselves from the depressive state. If however we are not that low, then our calling to God follows psalm 30, bookends of praise with content that is an admixture of emotions and fears as well as thanks and praise.
Two mizmorim with similar content, but with a message that is ultimately entirely opposite reflected in the anture of the poetry and its method. That's Biblical poetry!