The phrase “for all you care” is an idiom. It is used to suggest that someone does not care about someone else.
So if a person says “I might as well be dead for all you care”, they are essentially saying “Even if i died, you still would not care.”
Hope this helps!