No one deserves to be treated badly. And you are responsible for protecting the person that is you. You are your responsibility. You are the child you have to care for. If you don't protect that child (or puppy, if you prefer), who is you, then you are behaving exactly the same way a neglectful parent behaves when one parent abuses a child (or puppy) and the other parent does nothing to stop it. Someone takes advantage of you and you just stand there and let it happen.
That's a hard and painful thing to hear, and it's not your fault if you've been raised in such a way that you don't understand or know how to act on that responsibility to protect yourself, but it's the objective truth. If you are actively mean to yourself, and call yourself names and put yourself down and try to sabotage your own happiness by telling yourself that you don't deserve it, then you are behaving exactly the same way an abusive parent does. It's really not your fault if you behave this way, so please don't blame yourself, I'm merely describing the behaviors, not judging you. I already know you're a wonderful person.
These kinds of behaviors are very common for people who grew up in abusive environments. For many people, that's parents; for others, it's culture itself (and a person's peer groups). This is just learning. A child learns how to think about themselves the same way they learn how to read or do math. A child is not responsible for learning self-hatred or poor self-esteem. Dealing with self-esteem issues is very painful. But it's very important to understand that it's not, and has never been, your fault that you have poor self-esteem. You have never done anything to deserve it. Even if you let other people treat you like crap, even if you treat yourself like crap, that isn't your fault and it doesn't make you a bad person. These are behaviors and ways of thinking that you have learned and not indications of an intrinsic character flaw. Your worth is identical to the worth of every other person and always has been. But it is necessary to for you to understand the abusive nature of your own actions so that you can drop them. You do not deserve to treat yourself badly or deny yourself happiness. There has never been a justification for that.
The very first thing you need to do is forgive yourself for every terrible thing you think you've done, or every good thing you've failed to do. And then keep on forgiving yourself every time you slip and fail to protect yourself, or act abusively toward yourself. Until you finally understand your responsibility to yourself and it becomes automatic to act in self-loving ways. If you have the ability to avoid torturing puppies, you have all the qualities you need to be kind to yourself. Treat yourself as kindly, as gently, as playfully, as you would that floppy little puppy. You have to learn how to ignore the voices that try to convince you that you are worth less than other people. Those voices only exist because some people are trying to make themselves feel better by convincing other people that they are even worse than they are. It's a terribly strategy that only guarantees everyone will continue to feel miserable, including the people who are looking down on others. Everyone deserves our kindness, compassion, and love.