If not killing, a nice overload of lightning is in due. Torture him and let him come back as a wretch.
You can throw him into a wall then choke him within an inch of his life...but that's it. The other thing that gets me is if you then cover it up its as if nothing and i mean NOTHING has happened. His response are still the same, your affection level is the same...everything is the same. TBH i dont see the point of the betrayal it ends up having no bearing on the story.
It would've have been a better idea to have the droid betray you, he was given to you by Baras to begin with, and then have a crafting quest thingy to build a new one that you could name.