You know how, on an airplane, you’re supposed to put your own air mask on before assisting a child? There’s a good reason for that and it isn’t selfish: you aren’t going help anyone if you’re unconscious. You: do you.
In the wild, mothers will sacrifice a child readily if it means she will live. Selfish? No. If she dies, all the children (including the potential for future children) will die with her. Real selfishness is actually altruistic—in order to truly serve anyone else, you must serve yourself first. Making yourself the best possible version of yourself is the highest and best way to give the absolute most back.