Around here, most local courses have a "big team" match in the afternoon where groups are decided by A, B, C, D players based on hcap...in the interest of expedient play there is a maximum number of strokes a player may take on any given hole...I think A and B players can only take triple and C and D players a quad (I think...). Anyway, my 2¢ is that you did the prudent thing, although possibly for the wrong reason. You don't want to hold up your group or others with poor play...on the other hand if you're playing a nassau where total strokes determine the winner, you may want to play it out. Usually if you are looking at triple or worse you should probably pick up and take whatever max the group agrees on...unless your group is comprised of purists who insist on a hole-out or a "GU". If there's no $ on the line, who cares, really?
Now, as far as the mental aspect, probably one of the hardest things to do, especially if you're a weekend golfer, is to regroup after a poor shot. All I can say is that you must give yourself as much time as you can to calm down and approach the next shot as if you're not the one who put it there but must deal with it nevertheless...like if you're playing alternate shot and your lovely partner gave you this shot to deal with. You must do whatever it takes, mentally, to approach each and every shot with a "fresh" attitude. The best golfers are able to do this shot to shot
and hole to hole.
Now, the more you get frustrated and pick up, the less you will learn to do this...play through the adversity whenever you can do so prudently without holding up play. Mastering the ability to approach each effort with a fresh mind will stop that deadly domino effect of the wheels coming off.

Shade