Why can't I switch off the LED immediately using this sketch?
I can't see anywhere where you are assigning fadingState as true.I can't understand this part

if (fadingState == false) {
      // turn on the LED
        for (int i = 255; i &gt;= 0; i -= 5) {
          if (buttonState == HIGH &amp;&amp; fadingState == true) { 
          analogWrite(ledPin, 0); //immediately off
          i=-1;
          }  
    analogWrite(ledPin, i);
    delay(fadingDelay);   
    }


If you are entering in a if condition with statement fadingState as false. Then in for loop you are having a if condition in which statement is fadingState == true.If you are entering in as a False then why are you looking for True Condition.

Then if you manage to sort that add break; in that if condition so that when LED turns OFF you will exit that for Loop.

And Here you are setting the button state as low buttonState = LOW if first If condition, then in that nested if without reading the buttonState you still looking for it as HIGH.