Proverbs 17 and 18 continue similar teaching from past chapters. One point that is made over and over is that the wise will take criticism and punishment to heart rather than rejecting it; only fools will fight in protest. This is a difficult pill to swallow since receiving criticism is never pleasant. But the wise person will learn from the criticism and improve.
Psalm 91 is a psalm of encouragement to continue living in trust of the Lord. God will get you through the tough times and keep you under His wings.