Jameson, Faucet and Brown, along with a few other commentators I checked out seemed to concur with one another that the diseases spoken of here in this Psalm were "Penal" sickness. Or sicknesses related to sin. Commentators point out that the word used for sickness in the Hebrew is pertaining to deadly illnesses.
This would make sense possibly because forgiveness of sins, is mentioned in the same stanza with having illnesses healed (In Hebrew, the two statements are written on the same line.) One could argue that all sickness is the result of sin ultimately (I am not interested really in discussing that entirely.) But not necessarily because of personal sin, but more conceptually.
When the Pharisees questioned the blind man in John chapter 9, Jesus said the man was blind so that he could display the works of God through him. Not because he inherited blindness from sin.
Yet James also associates sickness and sin tenuously when he says to call the elders together to pray for you and anoint you with oil. He links the sickness and sin together in order to receive forgiveness.
It seems to me that the bible kind of has some of these truths in tension. In other words, sin "can" be the result of sin, but is not necessarily always the cause of it.
It seems that David is putting forth what he believed to be true according to the theological thinking of many Hebrew people of his time. Reading the law, one can come to the conclusions David came to. It is good however, to remember that the Psalms are poetry. It is also good to keep many things the New Testament has to say on the topic in mind as well. Since it is the better revelation.
Bad doctrine can be built by taking single statements out of context in the Psalms and building whole ideas out of them. The Psalmist here is declaring simply what is true. If you ever are healed of any deadly illness, ultimately, it is God who heals you.
As modern men, we tend to not give credit where credit is due. We boast in our technology and wisdom. But who gave us the minds to use them? Who gave us reason? Rationale? Logic? It is all given, for every good gift comes down from above from the Father of Lights in whom there is no variableness, nor shadow of turning. And if you are miraculously healed of your disease, who did that? If you lived in the ancient world, knew nothing of microbes, biology, white blood cells, antibiotics, or any other convention of which we all commonly know today, would you not credit God with every healing? Who cares that we now know the "how." As a matter of fact, I would think that we have lost much of the mystery of what it means to be created creatures. We have delved into so many mysteries, that mystery is now something we dislike, instead of being something for which we are simply grateful.
Lastly, I do not think heaven is a cop-out. Wherever Jesus went, he brought with him a foretaste of heaven. Wherever his foot trod, the vines of Eden crept. He gave access to the tree of life. His touch is our eternal hope. Heaven is our greatest hope. Just knowing that I am heading there is often the greatest elixir to heal depression of the soul and mind. People without hope become sick of soul.
Basically, the point of the verse is to give credit to God for healing. Let us just rejoice. The only reason we have to even think beyond what was just said is because so many people today twist the scriptures...it is sad. I cannot wait for eternity, sickness there, will be no more.