It seems like we come to the end, well, because it states: the words of Job ended. But not really, we have the words of Job that come later on, but this is definitely the definitive ending to his defense of why he is not being punished by God, but rather that he remained righteous even in the midst of these calamities that he is experiencing.
It is interesting that he lifts up sexual sin as a potential for why God might have punished him, if that were the case with him. Look at vs.1, 7, 9, and vs.10. But he assures us, the readers, that this simply was not the case. He had remained faithful to his wife and to his God. Even though his wife was not his strongest supporter, still he declares that he has remained faithful even in all this.
He creates hypothetical scenarios in regards to what should happen if he had been unfaithful not just to his wife but also to God. If he had withheld anything from the poor then his arm should be broken from his socket. If he had just trusted in gold alone then thorns should grow in his land instead of wheat and barley. He insists that he has not prayed calamity upon his detractors, but rather he has been faithful to the Lord. He is defending himself strongly here against all accusations.