If you rationalize that the mother sacrificing herself for her progeny is doing so because the pain of losing that progeny would be so great as to make life bad for her, then yes, it can be argued as an egoist act.
Egoism is a theory that all of your actions are designed purely to give yourself the most happiness or avoid the most hardship for yourself. We obey the law because we fear the pain associated with getting caught breaking it, etc.





