I think there is a very valid way to see that we practice sila to help get rid of fear! It's as if sila is the instruction, "don't stick your hand in fire," we don't have to follow it because we are fearful of getting burned, but because we are wise in understanding how to properly handle fire without getting burned. What is there to be afraid of? We know how to avoid trouble?
If we practice right speech, action, and livelihood, we never have to worry about our karma, about the internal experience of the sour grapes that arise as a result of treating others unkindly. This is an action of kindness to ourselves, to save ourselves the trouble, both internal and external, of the result of a negative intention.
The Dalai Lama has said that there are two kinds of selfishness, wise and foolish. Foolish selfishness just hustles and steals, greedily extorts and manipulates until there is nothing left. This is like biting the hand that feeds you. Wise selfishness understands interconnectedness and interdependency, the ecology of being. It understands that if I follow these standards, I will receive more, for a longer period of time. It understands that you treat others how you want to be treated. So, we practice sila because it is wise, and the kindness of our actions will reflect back on us, will be training in becoming a "better" person.
So what if there is still self clinging? You only need to keep in mind that the degree to which you feed into self clinging, that is the degree to which you are feeding into your own suffering and turmoil.
Sila is doing yourself a favor if you do it to save your own skin, or if you are truly acting out of total selfless compassion. Ultimately we do it so as not to be distracted on the path, it helps to clear the mind so that we can directly experience the ultimate truth of phenomena. So long as we have to worry and wade through our negative (clinging and grasping) actions and their consequences, we will be hindering our ability to see correctly.
I wouldn't beat yourself up, it's called practice for a reason ;)