Roll two dice, you can stop whenever, but if you roll the same face twice in a row you lose everything

If we condition on not throwing $r$, then there are only $5$ remaining possible results on the die. So it should be $$ \frac160+\frac56\left(S+\frac15\sum_{i=1,i\neq r}^6i\right) $$ Expand the bracket, and you get the first result.

Alternatively, consider the expected score after throwing the die, but without the rule that a throw of $r$ kills your score. It would be $$ \frac16\sum_{i=1}^6\left(S+i\right) $$ Now, if we reinstate the rule, one of these terms becomes $0$ and the other five remain untouched.