When you commiserate with your buddies, you're sharing your lousy feelings. People who commiserate have the same negative feelings about something.
Take a look at how commiserate is built: it's from Latin "com-," which means "together with," and miserārī, "to pity." Put them together, and you get "to pity one another, commiserate." When you commiserate, you and your fellow commiserators talk about how badly you're all feeling. After the layoffs, we all went to the bar to commiserate.