cannot but (formal expression) – can do nothing except, have an unavoidable obligation; We cannot but recognize his contribution to history.
can't help (expression) – cannot resist, cannot stop, cannot avoid; We couldn't help eating the whole pie. (had weak will-power); We couldn't help running into him on the way to class. (could not avoid); I couldn't help it. (There was nothing I could do. It was not my fault.)
can't help + but – (informal, merged expression)