n average moth is not likely to live more than a few days. In fact, one particular kind of moth doesn't even eat; it doesn't even have mouth parts. It doesn't live long enough as an adult moth to even need to eat. But, according to David, you and I are just as frail when compared to God (Psalm 39:4-5 & 11). David felt this inadequacy so acutely that he decided he was going to just keep his mouth shut... speaking neither good nor bad. But, that didn't work out. Although he tried to keep quiet, he couldn't stand it. He had to speak up and speak out. Well, in this Psalm he declared again his faith in God and his desire for mercy from God's hand.
In the last Psalm we read that David was restless and disquieted because of his own guilt, and due to the oppression which he was enduring from godless men. In this Psalm, he basically says that truly we have no good reason to be so disturbed about the shortcomings in our existence, because our time is so brief and our lives so futile that from certain angles, we don't matter anyway. Once we are buried in the ground, God and the universe continues on largely as if we had never existed in the first place. "What's the point?" David mused.
And yet, when he tried to institute this pessimistic philosophy, he couldn't take it. He had to voice his grief, even if philosophically he was convinced that he wasn't worthy to do so.