Old John Gill summarizes with this.
INTRODUCTION TO JOB 31
In this chapter Job gives an account of himself in private life, of the integrity and uprightness of his life, and his holy walk and conversation, with this view, that it might be thought that the afflictions which were upon him were not on account of a vicious course of life he had indulged unto, as was suggested; and he clears himself from various crimes which it might be insinuated he was guilty of, as from unchastity; and he observes the method he took to prevent his falling into it, and the reasons that dissuaded him from it, Job 31:1; from injustice in his dealings with men, Job 31:5; from the sin of adultery, Job 31:9; from ill usage of his servants, Job 31:13; from unkindness to the poor, which he enlarges upon, and gives many instances of his charity to them, Job 31:16; from covetousness, and a vain confidence in wealth, Job 31:24; from idolatry, the worship of the sun and moon, Job 31:26; from a revengeful spirit, Job 31:29; and from inhospitality to strangers, Job 31:32; from covering his sin, Job 31:33; and fear of men, Job 31:34; and then wishes his cause might be heard before God, Job 31:35; and the chapter is closed with an imprecation on his head if guilty of any injustice, Job 31:38.
One observation I see is despite the list of bad actions Job seems to say he has avoided, and if he has pursued he is willing to take the consequnces for, he display a certain air of confidence. We have to wait for Chapter 38 to read God’s response. Sort of reminds me of the rich young ruler, who asks what must I do to have eternal life, and then responds that he has done all that..Jesus’ response deflates his ego and….as Jesus teaches often, we must look beyond the actions and words….to the heart.
Job actual knows that for he said earlier:
Job 19:25 For I know that my redeemer liveth, and that he shall stand at the latter day upon the earth:
But before God removes the burden Job is enuring….he will have to get a strong reminder of who God is, let’s look forward to those chapters.
Job’s Final Appeal
Job 31:1 I made a covenant with mine eyes; why then should I think upon a maid?
Job 31:2 For what portion of God is there from above? and what inheritance of the Almighty from on high?
Job 31:3 Is not destruction to the wicked? and a strange punishment to the workers of iniquity?
Job 31:4 Doth not he see my ways, and count all my steps?
Job 31:5 If I have walked with vanity, or if my foot hath hasted to deceit;
Job 31:6 Let me be weighed in an even balance, that God may know mine integrity.
Job 31:7 If my step hath turned out of the way, and mine heart walked after mine eyes, and if any blot hath cleaved to mine hands;
Job 31:8 Then let me sow, and let another eat; yea, let my offspring be rooted out.
Job 31:9 If mine heart have been deceived by a woman, or if I have laid wait at my neighbour’s door;
Job 31:10 Then let my wife grind unto another, and let others bow down upon her.
Job 31:11 For this is an heinous crime; yea, it is an iniquity to be punished by the judges.
Job 31:12 For it is a fire that consumeth to destruction, and would root out all mine increase.
Job 31:13 If I did despise the cause of my manservant or of my maidservant, when they contended with me;
Job 31:14 What then shall I do when God riseth up? and when he visiteth, what shall I answer him?
Job 31:15 Did not he that made me in the womb make him? and did not one fashion us in the womb?
Job 31:16 If I have withheld the poor from their desire, or have caused the eyes of the widow to fail;
Job 31:17 Or have eaten my morsel myself alone, and the fatherless hath not eaten thereof;
Job 31:18 (For from my youth he was brought up with me, as with a father, and I have guided her from my mother’s womb;)
Job 31:19 If I have seen any perish for want of clothing, or any poor without covering;
Job 31:20 If his loins have not blessed me, and if he were not warmed with the fleece of my sheep;
Job 31:21 If I have lifted up my hand against the fatherless, when I saw my help in the gate:
Job 31:22 Then let mine arm fall from my shoulder blade, and mine arm be broken from the bone.
Job 31:23 For destruction from God was a terror to me, and by reason of his highness I could not endure.
Job 31:24 If I have made gold my hope, or have said to the fine gold, Thou art my confidence;
Job 31:25 If I rejoiced because my wealth was great, and because mine hand had gotten much;
Job 31:26 If I beheld the sun when it shined, or the moon walking in brightness;
Job 31:27 And my heart hath been secretly enticed, or my mouth hath kissed my hand:
Job 31:28 This also were an iniquity to be punished by the judge: for I should have denied the God that is above.
Job 31:29 If I rejoiced at the destruction of him that hated me, or lifted up myself when evil found him:
Job 31:30 Neither have I suffered my mouth to sin by wishing a curse to his soul.
Job 31:31 If the men of my tabernacle said not, Oh that we had of his flesh! we cannot be satisfied.
Job 31:32 The stranger did not lodge in the street: but I opened my doors to the traveller.
Job 31:33 If I covered my transgressions as Adam, by hiding mine iniquity in my bosom:
Job 31:34 Did I fear a great multitude, or did the contempt of families terrify me, that I kept silence, and went not out of the door?
Job 31:35 Oh that one would hear me! behold, my desire is, that the Almighty would answer me, and that mine adversary had written a book.
Job 31:36 Surely I would take it upon my shoulder, and bind it as a crown to me.
Job 31:37 I would declare unto him the number of my steps; as a prince would I go near unto him.
Job 31:38 If my land cry against me, or that the furrows likewise thereof complain;
Job 31:39 If I have eaten the fruits thereof without money, or have caused the owners thereof to lose their life:
Job 31:40 Let thistles grow instead of wheat, and cockle instead of barley. The words of Job are ended.