Feelbad situations are where the player feels bad about something that happens during the game. It doesn't matter why players feel bad, or if their misfortune is actually fair. Avoid creating these situations.
In general, winning players should gain points or resources, rather than losing players lose them. It can work out exactly the same, but the feeling is different.
No one gains any points. Ben, you lose 5 points!
Aww...
Ben: I spend the ten gold I've collected, to buy this cool horse! Yeah! Now I'll be able to gallop around. I'll go and attack the dragon now.
Tom: The dragon attacks you. It rolls a 6. Your horse and all your equipment are destroyed.
I was enjoying building up my character. Now, I'm back at the start of the game. Penalise the player in some way that doesn't send the game back in time.
Another feelbad situation is when a player gets no recognition for what they achieved, because it's an all-or-nothing system.
If you meet the objective, you get rewarded. If you almost meet it, you get nothing.
In 7 Wonders, you can put a lot of effort into your military, but if your neighbour is one point stronger than you, you get nothing. Also, you wasted all those resources on military, and the people who didn't even try to do military will be well ahead of you.
Avoid making "all or nothing" mechanics. Game scores should proportionally reflect who did well over the course of the game.
Randomness can often be very feelbad.
Getting a bad roll or card draw is feelbad, but, obviously, not all rolls or draws can be the same.
When a player gets something "bad", don't make it clearly worse than another option, in every way. Just make it different in some way, to hide the fact that it's worse. If you have a Spear with scores 3 and 3, it's fine to have an Axe with 1 and 4, even though it might be worse. It at least has some upside over the Spear. What's not okay is to have a Sword with 2 and 2. This is strictly worse than the Spear, and the player who gets it will feel ripped off. Obviously, if these things have costs or other factors, it's fine. Also, if the better version is rare, and the weaker one is common, that's fine, too. People will expect the weak Sword, and be pleasantly surprised to draw the stronger Spear.
Make it different in some way, to try to muddy the waters a bit.
In my gangster game, I had a die that causes other players to lose an amount of health. One face of this die was just the "1" — one damage. This roll felt terrible. I decided to turn the "1" roll into "Shakedown". This meant that each opponent could give you a dollar, and if they didn't, then they'd lose one health. This was still a poor roll, but people were usually pleased to gain a dollar or two, and they didn't feel like they just rolled the worst option.
Do not force the player to do something, where they once had a choice. "You cannot move" might be a fair effect in some game, but it's probably not good design. Do not interfere with regular card draw.
It doesn't matter if it's fair or not, avoid taking players' choices away.
Do not make loss of choice and good strategy one and the same. If an effect says "do this if you have no cards in hand", the player will just waste their cards, and do it, and then have no choices afterwards.
If you have unique player powers, or other effects that change the game, they should be positive. Prohibiting or penalising things is almost always disliked by players. Even making them neutral effects that simply change how things work, is often annoying for players.
In my gangster game, each player has a criminal "profile" dealt to them at the start of the game. These change the rules somewhat, for that player, for that game. Junkie had to spend his money to buy health, every turn, and Loner gained information instead of gang members. These characters were thematic and fair, but they were annoying to play. Almost all profiles are now positive, giving an extra ability.
In the Radlands expansion, I was trying all kinds of outrageous camp card designs. They variously stopped you: playing people cards, "junking" (discarding unwanted cards for a small benefit), restoring (healing), or drawing your card for the turn. These all gave some powerful bonus, but they were all miserable to play.