I'd echo the other answers that anxiety may be the real factor here – specifically some sort of performance/evaluation anxiety.
So if you face that head-on – talking to a therapist, reading about anti-anxiety strategies, etc – you may find that you are able to perform as a programmer. And even if programming itself isn't your best role – either because it triggers performance anxiety, or just doesn't match what you enjoy doing – addressing the sort of anxious-thoughts-under-pressure you're having will help in any other challenging interview/job role you find.
There are lots of roles in software that aren't constant intense programming, but require some familiarity with software lingo, tradeoffs, processes, etc and may involve small sessions of less-challenging programming. (These can involve various kinds of integration or demo work, project-management, "sales engineering", marketing, and so forth.) And you wouldn't need to "knock-it-out-of-the-park" on interview-style questions to qualify for such jobs – just show some ability to engage and improve.
But you may also have built things up in your mind as being worse than they are, leading to a self-reinforcing cycle of imagined doom.
Do some anti-anxiety research/coping practices. Maybe try to go into some low-value interviews even if you're scared – places you're not keenly interested in – as practice. You might find it's not as bad as you think, or that after a few it's no longer as scary. Consider other entry-level roles at software-type companies that let you learn about the industry and profession without needing to feel fully competent on day one. After you've interacted in a real environment you may find it easy to slide over into some useful closer-to-programming role, without the stressed-out ("PTSD") brain freezes you're facing now.
So if you face that head-on – talking to a therapist, reading about anti-anxiety strategies, etc – you may find that you are able to perform as a programmer. And even if programming itself isn't your best role – either because it triggers performance anxiety, or just doesn't match what you enjoy doing – addressing the sort of anxious-thoughts-under-pressure you're having will help in any other challenging interview/job role you find.
There are lots of roles in software that aren't constant intense programming, but require some familiarity with software lingo, tradeoffs, processes, etc and may involve small sessions of less-challenging programming. (These can involve various kinds of integration or demo work, project-management, "sales engineering", marketing, and so forth.) And you wouldn't need to "knock-it-out-of-the-park" on interview-style questions to qualify for such jobs – just show some ability to engage and improve.
But you may also have built things up in your mind as being worse than they are, leading to a self-reinforcing cycle of imagined doom.
Do some anti-anxiety research/coping practices. Maybe try to go into some low-value interviews even if you're scared – places you're not keenly interested in – as practice. You might find it's not as bad as you think, or that after a few it's no longer as scary. Consider other entry-level roles at software-type companies that let you learn about the industry and profession without needing to feel fully competent on day one. After you've interacted in a real environment you may find it easy to slide over into some useful closer-to-programming role, without the stressed-out ("PTSD") brain freezes you're facing now.