Yes.
So, this year has been super stressful for me and I have been dealing with some things I have never dealt with before.
Bound to hit your Fe and Si.
I noticed that when I get so insecure at the point I can't think of an answer I search for some external validation.
So get some.
However, the INTP version of external validation is auxiliary Ne, which isn't at all like the Te-aux for INTJs. In a nutshell, Ne looks for patterns in data, by cross-linking (observering the same phenomena in several disparate topics).
E.G. to get validation of your abilities at work, consider ALL the days you were in your job. Then do a mental tally of the projects that you did that turned out to be useful for the company, versus those that went nowhere. You'll realise that either (a) you're a waste of the company's time and want to move jobs, or (b) suddenly realise that you've been a lot more valuable and productive than you imagined.
As far as validation goes, similar: consider all the times when everyone was bricking it and you came in and saved the day. Probably lots.
I'm feeling undervalued in my job
You have to learn to stop taking what people say LITERALLY. I don't just mean that you should learn to understand metaphors and analogies. A lot of the time, people mean something completely different to what they said, often deliberately so. So rather than evaluate what someone said by the words they used, you have to think about their words in the context of their life and what you know about them.
Again, you can't just judge the context of their life by what they've said: same problem. You have to think about all the things you've seen them do and not do, and take into account all the things that you've heard others say, that no-one would say if they were lying. Effectively, you have to build up a rough picture of the person's life based on objective and impartial critieria, that in no way, shape or form relies upon trusting the person.
Then you have an accurate context for understanding their TRUE meaning accurately. Then consider all of the things they say at you.
For instance, say you are working for an INTJ who constantly berates you. If you're as rubbish as he says, why doesn't he have you transferred to another department? Why does he only berate you, when there are plenty of people far more incompetent than you, and yet he doesn't berate them?
If someone only berates those who are in the upper levels of competency in a department, it means that when be berates people, he berates them for their competency, because if he was berating them for their incometency, then he'd be berating the most incompetent most of all.
So why berate someone for their competency? Because you show the greatest potential, and so he is using the stick to make you reach more of your potential. The criticism is a motivational "stick", and is not a negative judgement of your potential. Rather, it's a positive judgement of your potential, because the person is not giving out negative judgements to those who earn those negative judgements the most.
This is just one example of how you need to learn to process other people's assessments of yourself.
and lacking control over my life. Which made me feel insecure and then doubt my career choice.
Part of the under-valuing. Ask yourself: what would happen if you didn't turn up tomorrow?
Better question: what happens when you're sick? How far does the company move your projects on without you? Wouldn't make sense to? Every day that a project is completely early, means more money for the company. Of course they want to get it done earlier. If you are off sick, they'd love to get someone else to move your work on.
It's pretty common in software for people to have to take on software that was written by someone else. So this sort of thing is normal.
However, the better the coder, the harder it becomes to find someone who can take on their work, understand it, and improve it, anywhere near as fast as the coder.
So this gives you an objective way of telling how much your company relies upon you.
Why is that important? Because the more your company needs you, the more they are terrified of you leaving and going elsewhere. Hence the more they want to control you and make it as difficult as they can to make you stay. Hence the more they want to knock your confidence till you have lost the will to get better and better jobs which will take you to better companies and away from you.
As Dale Carnegie wrote: "No-one ever kicks a dead dog."
The more you get criticised, the more that people are trying to keep you down to stop you from having the will to get up and leave, and the more they want you to not leave, the more they want you to stay. The more they want you to stay, the more they need you and rely on you, which means the more power you have over them.
So in short, more criticism => the more they rely on you => the more you can demand from them to get you to stay => the more control you get over your own life.
Applies to families, friends and to girlfriends too.
But remember that because you have soooo much power over these people, even a tiny use of your power scares them, as in truth, they are so reliant on you that they feel that you could demand almost anything or threaten to leave and they would have to give it to you.
YOU have all the power. That's why they're screaming all the time. They're terrified you might leave. So you need to tread gently, but firmly.