Should I practice boxing just for self defense?

So I want to practice boxing because I’m scared one day I’ll be placed in a situation where I’ll have to fight someone and not be able to win because I don’t know how to fight. I don’t want to fight anyone, I really just want to be able to know that If it ever comes to it, i can use it. I’m also scared because the few times I have gotten into fights the first time. I wanted to cry not because I got hit but because I hit someone for the first time and I didn’t even know the guy and felt bad. The second time I got into a fight I got hit and I was able to take the hit, and I didn’t do anything because the guy ran away why I dunno. Then the third time I got into a fight it was with a teammate because I was messing around and he got pissed. Even when I was fighting him and had him in somewhat of a headlock, I still didn’t want to punch him, and when I would I didn’t want to hit him hard and I would pull my punches. So I just want to learn to protect myself and I’m asking because I don’t want to go to a gym and waste someone’s time. Also I suffer from arrhythmia and have gotten tachycardia can i still practice it even if I have that?
Should I practice boxing just for self defense?
Add Opinion