You seem to be assuming that a person with a shorter lifespan will necessarily average the same use of resources per year, but that is not generally the case. If, for example, you eat meat, that meat ate a lot of vegetation, and all of that needs to be considered in one's use of resources. Plus, someone who dies young can still have the same hospital bill in the end, so the average per year cost for such a person is likely to be higher than for someone who was healthy longer and worked longer (also, not missing so many days of work being sick).
So I think you will find that leading a healthy lifestyle is actually going to tend to be better for the country, the economy, and the environment, than leading an unhealthy lifestyle. And obviously, better for the individual.