Hi there Light,
Firstly, you are NOT a bad person. Often times we will consider ourselves bad based on how we see others react or handle things. We use their reactions or non-reactions as a gage of who we should be, good or bad. From what you've told me it seems as if you are dealing with your own internal battle of how to advocate for yourself in times of distress and how to diffuse conversations that you may not want to have. This is not an isolated struggle, we all find ourselves or have found ourselves shutting down when things become too much.
Being a toxic person or friend is not holding yourself accountable for what you may have contributed to a situation. It seems to me that you are already working on that but you can't beat yourself up in the process. When in a heated argument practice some deep breathing to center yourself. It's okay to say "I do not want to talk about this right now, I need some time to process what you're saying" and step away. This could prevent you from 1. shutting down from frustration or fear and 2. speaking before you've had time to process what the hell is being said.
Also, not to get all Hey Fran Hey on you but this could be factor of some deep rooted childhood trauma that needs to be worked through. Check out this episode of The Friend Zone where they talk about relationships with parents and how that can really shape who you are.
I hope this helped.
My fellow Lights comment below with some confidence for our fellow light. What would you do?