Can you phrase it in a less absolute/intrinsic way, though? "I am a dumb dumb" isn't a solvable problem.
I encourage you not to personalize this (Using "I am"). You may not be a mediocre software engineer, but that does not equal YOU being a dumb dumb.
That's a false equivalence. I'm sure there are areas where you are not a dumb dumb.
Instead, accept that they feel some way. And encourage them not to let those feelings hold them back (also, avoid "but"s those also minimize or invalidate feelings).
For example, even if someone is suicidal, psychologists are trained to listen and accept their feelings.
Then help them understand why they feel that way and if other interpretations or actions can make extreme thoughts and feelings more manageable or understandable.
Depressed/suicidal people have the most accurate grasp of reality. Self-delusion and protection from self-harm are built-in into the psyche, so it's not that their feelings are inaccurate, but that unrealistic optimism is the only way humans (and other animals) can cope with reality.
Wanna know why? Cuz you're not actually a dumb-dumb. <3