When you're following only to punvh him like you did then it's not self-defence and when you then start doing 2v1 and does enough damage for him to bleed and almost die he can kill you.
Also, you clearly see he went away from you and you followed him only to continue punch him.
And the thing with the gun, don't take out a gun like that in the middle of a fight