do for

[do for] {v.}, {informal} To cause the death or ruin of; cause to fail. - Used usually in the passive form "done for".

The poor fellow is done for and will die before morning.

Andy's employer always does very well by him.

If Jim fails that test, he is done for.