This psalm is a 'maschil' or psalm of instruction, and it tells us that if we've got a problem we ought to share it - with God in secret, and in joyful praise in the congregation. Trouble is inevitable says M Scott Peck in another of my 'top 100' books 'The Road Less Traveled'. Life is all about the way we cope with problems. To some extent life's best lessons are 'learned in the school of adversity'. For those who get on top of their troubles life may 'get better and better even though it gets harder and harder'.
Different people react to trouble in different ways.
But others aren't. Some, facing trouble, 'die', become immobilized, collapse when someone thwarts their plans or hurts them. Life is just too hard. Others explode in frustration or rage, externalizing their feelings towards or against other people - or even physical objects. Others internalize their anger and may become sick or depressed.