Both Nephi and Paul cried out, "O wretched man that I am". these were two of the most righteous and valiant men of the scriptures, and if they are wretched men, then what hope do we have?
As we were sent to earth, it was with the understanding that we would have flaws and weaknesses built in. We know that because the Lord himself told us so. As a result, we find ourselves committing sin on occasion, even as we know the right thing to do. Why is that? Well, be of good cheer; there is hope for us all.