You have to make sure that when the player fails, they fail because of their own mistake or (lack of) skills.
Meaning, the controls have to be perfectly responding, so that the player will not be frustrated because of confusing or badly responding controls for example.
Likewise for any other mechanic in the game. It has to make sense, be clear and not be lacking in any way.
Players should feel they lost due to a failure of theirs rather than to "unfairness" of the game/design.
At last, if player "rages", unplug the screen and device they are using and send them outside get some fresh air instead of putting themselves through an experience that causes them such emotion :/