It's important to look back to see where you started and what you've achieved. Not doing good at an interview doesn't mean you are worthless! It just means that that isn't the right place for you. But thankfully, there are plenty of opportunities and we just have to keep looking.
Its also important to remember to be yourself. EVERYONE feels like they are an imposter at some point or the other. Just accept the fact that there will be smarter people, and that is okay. Take it easy on yourself, and give yourself credit for all that you've done.
And I wouldn't worry about interview puzzles too much. I politely decline an interview if I don't agree with the process. There is a place for everyone, and if you don't feel comfortable during an interview, chances are you won't fit in the company. And that is okay. Just move on to another place where you feel you can fit in.
And please, NEVER say to yourself that you're worthless! Its very inviting to go down the dark path. Trust me, I've been there. But it serves absolutely no purpose and drains away your life. If you think its serious, talking to people you trust might help.
And remember, you aren't alone. There are lots of people who have faced a similar situation and have worked through it. All the best!