"The foolishness of man ruins his way and his heart rages against the Lord"
Foolishness is a moral quality in the Hebraic understanding; not a level of one's mental acumen. To be a fool is to be self-focused, selfish, impulsive, rebellious. In the reference in the Theological Wordbook of the Old Testament under H200, the word fool is described as someone who is morally deficient.
It is the sin nature in each one of us that makes us fools. Each person has the natural tendency to see every situation from a self-focused point of view. This tendency must be overcome by wisdom, knowledge, prudence, and understanding.
This verse declares the basic truth of the whole book of Proverbs. If you let your natural foolishness, impulsiveness, and rebellion direct the course of your life, you will ruin your life.
The result of this type of foolish, sinful action is that you will be angry at the Lord for not making your life better; but it is you who has destroyed the life that God gave you.
The Septuagint, in a rough translation, says that a fool destroys his life and he accuses God in his heart.