What you're describing is a sensitivity to your own violent thoughts and actions. You feel bad even thinking about inflicting pain on a training partner, even if it's just a "tap" which you know causes no real pain. Just the thought of hitting someone over and over again causes you to feel bad. And so after 3 years of being in a style that practices that way, you decided enough was enough and walked away.
You're fine when you're just going over techniques and strategies, because it's all nicely controlled, and there's no hard impact. It's analytical. There isn't much room for emotion in that context.
Whereas, when you spar, you're engaging your emotional mind in addition to your analytical mind. That's when you begin to feel sensitive about violence. That in turn causes a great deal of anxiety and stress.
Sparring is a stressful situation, also. If you're not paying attention, or if you make a mistake, then you get hit. And Taekwondo teaches an aggressive form of sparring, whereby an offensive approach is instilled in the student from day one. You're taught to keep moving, keep attacking, keep pressure on your opponent. And if you don't do that, you usually get hit a lot. So it forces you to dial up your aggression. For sensitive people, that can be overwhelming.
I'm actually surprised you stayed for 3 years. I would have told you to leave after the first few times you felt this way. It's clearly not healthy for you to be there. It causes you to feel anxiety and stress, so why keep putting yourself through it?
By the way, I know that towards the 3rd year of Taekwondo, that's when things start getting more serious for a lot of people. That's when you enter the advanced colored belt ranks and start preparing for black belt. Things can get more serious and intense. I guess it makes sense that this is when you decided to get out of there. A lot of people leave right about then.
If you really do want to return to Taekwondo someday, my advice would be to try to reframe sparring in your mind so that it means something different to you. Then you won't feel the anxiety and stress that you do now. You can do that a number of ways.
For example, instead of feeling like you're trying to harm someone during sparring, you might try to think of it as helping them instead. If you're not trying to win, you're doing your opponent a disservice. He/she loses an opportunity at improving. So you're not being helpful unless you try to win. Realizing that might change some things for you.
Another thing you might try is to think of sparring as a game. Lots of people think of it mostly as a game. It's fun. It merely looks violent. They hit their opponent, but they don't hit hard enough to cause pain. Think of it as a game of Tag. When you're sparring, pay attention to your own thoughts. Are your intentions to cause harm? Are you angry? You mentioned envisioning your opponent as a killer or a rapist. Don't do that. Think of your opponent as being your friend, instead. And you're having fun with him/her. You're playing. It's a game. When you feel bad intentions, acknowledge having those thoughts, and quickly try to think of happier thoughts. Smile. Relax. Breathe deeply. Remain loose, but confident and happy.
Doing those kinds of things might help you reframe this in your mind from something that's violent and aggressive to something that's fun and stress relieving, like a game. Or something that's helping you and your classmate improve and succeed, giving it purpose beyond being a mere game.
Part of this, I suspect, is also your Taekwondo instructors and the environment and culture at your Taekwondo school. You might try looking at other schools of Taekwondo near you to see if one of them is a little less aggressive and violent, more happy, positive, and playful. They exist. Not all Taekwondo schools are the same. Some Taekwondo schools spend a lot less time sparring than others, and when they do spar, they give people specific techniques, strategies, and goals to try, rather than just having people free spar at random.
In the meanwhile, just realize you're doing fine. There's nothing wrong with you. You're just a highly sensitive person. Lots of people are the same as you. And you're now realizing that and taking appropriate actions to find a martial art that's a better fit for you. That's good. It's what you should be doing. That's part of what martial arts is about - becoming aware of who you are and what you want to do.
One other thing. If you want to go a completely different route, try taking Judo or Brazilian Jiujitsu. I highly recommend it. They're based on grappling, not striking. You probably won't experience the same anxiety that you did when sparring in Taekwondo. Everything in Judo and BJJ is under more control than TKD. There are less injuries, also. You'll find that they never try to intentionally harm one another in practice, and they generally do care a lot about safety. When you do look for these schools, inquire about competition and whether or not it's required that you compete in order to gain rank. You might want to avoid those competition-focused schools.
Hope that helps!