John Gill's Exposition of the Whole Bible
Proverbs 10:2
Treasures of wickedness profit nothing,.... By which are meant either a large abundance of riches in general, which for the most part are enjoyed by wicked men, and abused to wicked purposes, Proverbs 11:4; or an affluence of them, obtained in a wicked way, by fraud, oppression, and the like; see Micah 6:10; Or are either not used at all, or put to wicked uses: what are not used profit not the possessors of them, for they are "kept to the hurt of the owners" of them; and those which are got by ill means, or put to an ill use, "perish by evil travel", Ecclesiastes 5:13. Nor can anyone by his riches either redeem himself or his brother from destruction, or give to God a ransom for him; nor can he by them save himself from a corporeal death one year, one month, one day, one hour, one moment; nor will they be of any service to him in the day of judgment, when wrath comes forth against him;
but righteousness delivereth from death; either that which is righteously got, though it be ever so little, is a means of preserving life, and keeps their souls from famishing, Proverbs 10:3; or else what is liberally dispensed, for alms are called "righteousness", Psalms 112:9 Daniel 4:27. These are oftentimes the means of saving the lives of persons ready to perish, on whom they are bestowed, and who will venture their lives to save their benefactors; and such liberal persons are oftentimes blessed with long life, and are kept alive when threatened with death, Psalms 41:1; and though their good deeds are not meritorious of eternal life, yet they are rewarded with it in a way of grace, Matthew 25:34. Moreover, righteousness may be considered as legal and evangelical; a legal righteousness, or the righteousness of men in obedience to the law, cannot deliver from the sentence of death the law has passed; it is not properly a righteousness; it is imperfect, cannot justify, save, or bring to heaven, or entitle to life; notwithstanding this a man must die: but there is an evangelical righteousness; and this is either imparted and implanted in men, is the new man, which is created in righteousness and holiness; and this delivers from a moral or spiritual death, a death in trespasses and sins men are in; for by it they are quickened, live a life of faith on Christ, and have communion with God; have his image stamped on them, and live to him, and to Christ, and to righteousness, being freed from the servitude and dominion of sin; living in which is no other than death: or this righteousness is imputed, which is the righteousness of Christ; wrought out for them, reckoned to them, received by them, and by which they are justified; this delivers them, though not from a corporeal death, yet from the sting and curse of it, and from it as a penal evil, or as a punishment for sin: and it delivers from a legal death, or from the sentence and condemnation of the law, and from the second and eternal death, and entities them to life everlasting.