humans are selfish, and that's a necessary trait in order to survive. being selfish is only bad when it makes you do things that you know will harm other people, or hurt the people close to you on purpose. in order to be a good parent, you have to start with being a parent, or at least alive. a dead person, a depressed person, and anxious person, and all those horrible options, will usually have a much harder time being a good parent, than someone who is happy, empathetic, and holds their own (in order to stay alive and happy) and their child's interests higher than those of any other people in this world.
whatever your sister told you should be disregarded almost completely. it's not selfish to want your needs covered. if you needed attention, someone else could have been less selfish, and just given you that. nobody who decided to not give you what you needed right then has any right to criticize or call you selfish. suicide could theoretically be a selfish decision, but i'm not sure anyone in a sound mental state would find enough reason to try dying when they're still young and have lots more than just death left to experience.
there might be truth in what your sister said, but it's a truth about the past. i've made bad decisions in the past. being reminded of them used to make me anxious, ashamed, hurt. but in the end i just accepted the truth that i used to be a complete idiot, and i'm some of that still. but there decisions were made from what i knew then, and what i thought was the better thing to do. i'm not going to blame myself for the rest of my life, unless i made a horrible decision despite knowing a whole lot better. i really did what i felt was right for me. now i'm living with consequences of that, but none of it is actually bad considering what a different decision could have caused.
just a little curious about in which way you are a bad parent. do you hit your child? neglect her? are you way too cold and unfeeling? do you act violent to others in her presence? do you make her stay in her room alone even when she's scared and crying? or do you actually care about her, listen to her, try to understand her needs and meet them? how does your sister even know whether you are a good or bad parent for your daughter, does she observe your interactions that closely?