If you want to produce the sensation of being trapped you have to use the feeling of power and loss. It stems from the sense of 'If I could just...' If I could just get out there, I could defeat that henchman for him. If I could just get out there, I could solve that riddle for him. If I could just escape this box, all would be fixed.
Now, the trick is, because this is a video game, players have a reduced sense of agency. The player's sense of capacity is 'what happens when you hit the button.' Mario, before more modern adaptations, had a capacity to move left and right, jump, run, and 'use ability.' The player never had the ability to do anything else, so it never feels like a limitation. No one ever said, 'playing Mario makes me feel trapped because I could beat Bowser if I could just access the cannon that's right over there.'
So, to produce the feeling of confinement, one must create the sense of power, and then take it away. Give the player enough power that they could even defeat the dragon, but then take it from them so they feel limited. If you can find a way to make it feel like it's not even forced, as in they feel like they could have won the game in Act 1, Scene 1, but their ~~lack of~~ skills as a player were what made them lose, all the better.
Start with the token effort of not engaging in negative self-talk. Calling yourself scum is a self-fulfilling prophecy, a lie to let you feel self-righteous when you have been trained not to feel self-esteem. You must learn to spot that thought as you are having it and cut it off. It's the only way out of the spiral. In case that's too vague, whenever you are even thinking you are inferior, focus on literally anything else, as long as it occupies you enough to cut off the train of thought. Do math in your head. Focus on a 4 seconds in 6 seconds out breathing cycle. Balance a pen on your finger. Whatever. Just don't follow the train into darkness.