I've gone through some iterations of this, if you will permit me to meander a bit...
When I was young, I did feel worthless. I was treated poorly by my peers and some adults. I learned to expect abuse of one kind or another, never look forward to acceptance or happiness, and all at a young age. My mistake during that time, though, was defining my worth with how I was being treated... as in, I was treated as if I had no value, therefore I must have been worthless. Life made sense to me back then, because sure... I was treated like crap, but I deserved all of it because I was worthless.
But... at some point I made a realization. I started to like who I was. I was not at all perfect. I created some of my own problems. I had lots of flaws... but I was not worthless. I had value as a human being, and I had value in what I was capable of being and doing and giving to others around me. I was not at all worthless! Yet, I was still treated pretty much the same... and that's when I started to be depressed. See, believing in myself and that I had value meant the treatment I received was not deserved. It meant I was being abused, neglected, ignored... but I had value. I was not worthless... and the world no longer made any sense to me.
I did not think I was owed anything. But I thought it weird for people to sometimes go out of their way to hurt me, to actually put planning and effort into hurting me, when I was not worthless. It made no sense, and unlike when I thought I deserved it... I now knew I didn't deserve it. Nobody deserves it. But it happened anyway.
So... in a weird way... I felt better when I believe I was worthless because the world made sense, I had a place in it, and I deserved what happened. I only became depressed when I felt better about myself.
It is possible to think you are worthless, and have someone treat you kindly and you will appreciate it tremendously even if it confuses you at first. But it is also possible to believe you have value, but still have people treat you cruelly and it will hurt you more because it surprises you.
Your value, hence, is not directly related to how people treat you. Nor do people treat you according to your value. In therapy they tend to want to treat you by getting you to believe in yourself, and that's good to a point... but if the world treats you as if you are worthless, I don't think it matters whether you believe in yourself or not. You get what others allow you to have.