There are some ways in which the lines between Law and Gospel seem a bit blurry. For example, with the case of the rich young ruler in Mark 10, was Jesus only trying to point out that the man could not justify himself by the Law? To me, I can see how Jesus was also giving him a serious answer. To inherit eternal life, you must follow me, and you must value me as your greatest treasure.
This sounds almost like Law. It sounds almost like Jesus is demanding a kind of obedience in order to be saved. The answer, I believe, comes in understanding what true faith is. As men like John Piper vociferously argue, faith has, as one of its core elements, an apprehension of and treasuring of Jesus Christ. It sees His glory and savors it. This is one of the key elements of faith, and it is an element which make it supernatural, distinguishing it from natural inclinations of self-preservation, for example.
Faith, in this sense, is good and virtuous. Andrew Fuller argued that faith did contain virtue. At this point we must be careful. First, this does not mean that our faith can ever justify us. It is still imperfect, tainted with sin, wavering, weak, etc. If we were to stand upon it, we would be condemned every single time. Second, faith never is supposed to be the basis of our justification. Never. Jesus is. Faith is a gift of God which leads us to embrace Him as the glorious Bread of heaven we need, brings us to savor Him more and more as the light brightens, and leads us to display that valuing of Jesus Christ through love and obedience.
In other words, I think Jesus both showed this man that he was an idolater, and therefore needed a Savior, and that he also needed to embrace and treasure Him above all things. There is a sort of connection between faith and not being an idolater. I think it was Luther, in his larger catechism, who made the connection between believing in Jesus and obeying the first commandment. Tim Keller expanded upon it a bit. Basically, faith, which has Jesus as the foundation for our life and identity, places Christ as God, where He belongs, and sin, which is idolatry, is building your life upon things other than God. If Jesus is not your righteousness, for example, but your religion is, then you are an idolater. To the extent that any of us do not value Jesus as our supreme treasure, we are guilty of idolatry, which here amounts to imperfect and weak faith. That is us. God help us.
Of course, the faith we have, no matter how weak or tenuous or near-sighted it is, is a gift of God -not something we mustter, and it connects us to the objective merits of a perfect Savior with perfect righteousness and atonement. That is good news.
Food for thought...