Every man experiences pain in one former another. But few men redeem it and use it for higher purposes. David turned to God in his time of pain and committed his spirit to Him.