There were a lot of times when Sasuke almost killed his friends, as was shown in the series. However, it seems that there were quite a lot of times he saved them as well. Although it should be mentioned that according to the fandom, there are mostly two people that Sasuke has ever considered as his friends. Those are, of course, Naruto and Sakura.
So, as a result, on a list of times Sasuke almost killed his friends and saved them, those two are going to be the ones featured most. Although he had made friends with Suigetsu, Jugo and Karin as well, none seem to have ever gotten as close to him as Naruto and Sakura. Here is a list of times Sasuke almost killed his friends, and those when he saved them as well.
3 times when Sasuke almost crossed the line in anger
1) He tried to use Chidori on Sakura
Both Naruto and Sakura have tried several times, in their separate ways, to stop Sasuke from going over to the dark side. When their efforts failed, although the Hokage did not give up, Sakura once made up her mind to stop Sasuke from causing further harm by killing him. This happened after the Five Kage summit when Sasuke killed Danzo Shimura.
After that fight, Sakura tried to deceive him by saying that she would join forces with him, while secretly gathering the courage to kill him. Sasuke, however, seemed to have seen through her deception when he tried to use Chidori on her instead. Thankfully, Kakashi came and saved her just in the nick of time.
2) Used Chidori on Karin
During Sasuke's fight with Danzo Shimura, the latter tried to protect himself by holding Karin hostage as a last resort. He seemed to think that Sasuke would not be able to kill or harm his teammate.
However, during that time Sasuke had been blinded with hatred and rage, not to mention that he was almost literally blind as well due to overuse Mangekyo Sharingan. In the end, Sasuke ended up stabbing through Karin to get to Danzo.
3) When he almost killed Naruto during their fight
Over the years, the fights between Naruto and Sasuke have only grown more and more gruesome. During their first big fight in The Final Valley, Sasuke could have killed the former as he had lost consciousness, however he did not seem to be able to do so.
In their last fight, in The Final Valley, though, Sasuke did his utmost best to kill Naruto by any means. Although that failed, both of them lost their dominant hands during that fight, and possibly would have died if Sakura hadn't arrived and healed them in the nick of time.
3 times when Sasuke acted as the guardian angel
1) He protected Naruto during their fight with Haku
In what seemed to be the first major arc in the Naruto series, the fight between Zabuza, Haku, and Team 7 took a serious turn. In their fight on the bridge, Haku had Naruto completely trapped inside his Demonic Mirroring Ice Crystals Jutsu.
He possibly would have ended up killing Uzumaki with his Ice needles, if not for Sasuke's protection with his body while deflecting Haku's attacks. This was one of the first times Sasuke saved his friends. This also started a friendship that became a major theme of the entire series.
2) Saved all of former Team 7 from Infinite Tsukuyomi
When Madara, finally unleashed Infinite Tsukuyomi on the whole world during the Fourth Great Ninja War, Sasuke saved all of them at once by keeping them inside his Susanoo.
If this had not happened, all of them, with the exception of Sasuke, would have ended up trapped inside the Tsukuyomi. That is something that not only would have entirely changed the course of the battle but would probably have destroyed the world as well.
3) Saved Uzumaki and Sakura countless times in Boruto: Naruto Next Generations
During the fight with Shin Uchiha and his clones, Sasuke saved Sakura just in time before she was hit with a fatal attack.
After that, during the Momoshiki arc, when Naruto got kidnapped by the same, he arrived there with Boruto and provided aid to the best of his ability, until Momoshiki was killed by Boruto's Vanishing Rasengan. He even tried to aid the Hokage during the fight with Isshiki.
The friendships between characters seems to have taken center stage a lot of times in Naruto. From Hashirama and Madara, Kakashi and Obito, Itachi and Shisui, Shikamaru and Choji, and Naruto and Sasuke's friendships have provided fans with moments that they will cherish forever.
With Boruto: Naruto Next Generations, this trend seems to continue with the new generation of Shinobi. Stay updated with new developments of the series here.