Psalm 94:12
10 Does the one who disciplines the nations not punish? He is the one who imparts knowledge to human beings! 11 The Lord knows that peoples’ thoughts are morally bankrupt. 12 How blessed is the one whom you instruct, O Lord, the one whom you teach from your law 13 in order to protect him from times of trouble, until the wicked are destroyed. 14 Certainly the Lord does not forsake his people; he does not abandon the nation that belongs to him.
Job 5:17
15 So he saves from the sword that comes from their mouth, even the poor from the hand of the powerful. 16 Thus the poor have hope, and iniquity shuts its mouth. 17 “Therefore, blessed is the man whom God corrects, so do not despise the discipline of the Almighty. 18 For he wounds, but he also bandages; he strikes, but his hands also heal. 19 He will deliver you from six calamities; yes, in seven no evil will touch you.
Notes and References
"... Surprisingly, the harsh nature of divine discipline did not elicit complaint, at least from those who discuss it in the Bible. On the contrary, it gave rise to the notion of happiness. Here is what the author of Psalm 94:12 says: “Happy is the man whom you instruct.” A macarism also occurs in Job 5:17 ... It may seem strange to link happiness with suffering, but Eliphaz is far from alone in doing so. Like the observation about divine discipline in 5:17, the statement that the deity both wounds and binds up, strikes and heals, has a proverbial ring. It gives expression to popular belief, one that has become almost formulaic. The pronoun identifies the deity as the active agent of the pain and initiating blows, just as the qere reading leaves no doubt that the healing is the result of divine activity ..."
Crenshaw, James L. "Divine Discipline in Job 5:17-18, Proverbs 3:11-12, Deuteronomy 32:39, And Beyond" in Dell, Katharine Julia, and Will Kynes (eds.) Reading Job Intertextually (pp. 178-189) Bloomsbury T&T Clark, 2013