Any of us should be able to understand the feeling of anguish that made David wish he could run away and hide, that made him wonder where God was and if He would ever relieve his suffering. The man after God’s own heart may be able to teach by his example how best to handle that kind of hurt. I’m leaving you on your own to make a list of your observations of the ways he handled the situation.
One note, however, about some of his comments. If they seem to jump around, one minute praising God for giving him relief and the next crying out, “How long?”, that’s because they do jump around. Have you ever experienced the kind of distress that one moment you were in control of, and the next moment your control slipped? That’s what David experienced, too. He was a human being with human feelings, just like us. He handled his anguish in a way that obviously pleased God, so we can learn from his experience.