1. His mask contained needles

When Darth Vader puts his mask on most would assume that it’s just a normal(ish) mask that fastens with some kind of pin-lock mechanism. While this is how Vader’s mask fastens together there is a little more to it. His mask (and the rest of his suit) contains needles that poke into his skin, through his skull and spine in order to connect with his central nervous system. This binds Vader with his suit so the man and machine can become one.
As a result of this, Vaders cybernetics had all the functionalities that his actual limbs had. Meaning he can feel pain. This can be seen in “Return Of The Jedi” when Luke Skywalker cuts off Vader’s hand. Without this technology, Vader would have to use the force to move. Which was possible to do but could only be done for a limited amount of time due to the strain it had on him.
These connections were also used to regulate his body. Allowing diagnostics tests to be run every millisecond, making sure his vitals were at optimum levels at all times. If any irregularities were noticed the suit would take the proper measures to ensure homeostasis.
However, this process was flawed since it caused Vader a great deal of torment every time he put the suit on. On top of this, the cybernetic connections were imperfect and would often tear his living tissue. Every time this happened, Vader’s whole body would be filled with extreme pain. Of course, this wasn’t actually a design flaw since this is what the Emperor wanted. His intention was to keep Vader in a constant state of pain and rage. Ensuring any remnants of sanity left within his apprentice was nothing but a thing of the past.