"Remove Thy stroke away from me: I am consumed by the blow of Thy hand." (Psalm 39:10) When does it end? When God is done, I don't know how else to put it. It took Jesus three days and three nights in the grave--despite being a sinless, perfect human being--to pay for everyone else's sin. The mere season, however long, that God decides to purge us of whatever it is within that's keeping us from fuller communion with Him should be welcomed. Not prayed for out of His time, but seen as beneficial should you sense its onset and/or feel yourself within, if that makes sense. Job continues (from the passage in part 3):
"I would order my cause before Him, and fill my mouth with arguments. I would know the words which He would answer me, and understand what He would say unto me. Will He plead against me with His great power? No; but He would put strength in me." (Job 23:4-6)
When we go through that deep period of God's chastisement, we know He has the answer. We know this. Assuming we've felt in any way, the tug of our old nature in light of who we are now, we also know that "He hath said, I will never leave thee, nor forsake thee." (Hebrews 13:5b) We bank on this and it's what keeps us going. Digging for that piece of grit that grinds our gears. But until God reaches it, we feel the heaviness of his hand. When the Holy Spirit allows us to see that Jesus paid for our sin but that there is still something resident in our thinking needing to be dealt with, I believe this is when the first ray of light you knew you were heading towards, begins to show. Contrast the fear Job felt in verses two and three ("Even to day is my complaint bitter...") with his confidence that upon reaching God he'd not only receive what he needed, i.e. the answer, but also that he would receive the strength to continue going forward.
"Thou hast beset me behind and before, and laid thine hand upon me. Such knowledge is too wonderful for me; it is high, I cannot attain unto it." (Psalm 139:5-6)
One of the surest promises I know comes from the little Old Testament book of Nahum. The third verse of his first chapter says "The Lord is slow to anger and great in power, and will not at all acquit the wicked: the Lord hath His way in the whirlwind and in the storm, and the clouds are the dust of His feet." When we sense anything akin to a whirlwind or a storm, whatever the reason, let it wash over and leave you new. God has His way. And all He wants is for us to get to know Him better through it. His love, His wisdom, His strength and power.
"Ascribe ye strength unto God: His excellency is over Israel, and His strength is in the clouds. O God, thou art terrible out of Thy holy places: the God of Israel is He that giveth strength and power unto His people." (Psalm 68:34-35)
"And now men see not the bright light which is in the clouds: but the wind passeth, and cleanseth them. Fair weather cometh out of the north: with God is terrible majesty." (Job 37:22)