I know your feelings; early in my ministry, I had a similar experience with a friend who seemingly followed Christ, but then turned away and took a far different path.
Only God knows your friend's heart, and whether or not he had truly committed his life to Christ or was just going through the motions. Tragically, many people are like that -- claiming to be Christians or involved in a church, but in reality they have never given their lives to Jesus Christ and their first loyalty is to themselves. Even one of Paul's co-workers was like this: "Demas, because he loved this world, has deserted me" (2 Timothy 4:10).
Pray for your friend, that the Holy Spirit will convict him of his sin and turn him back to Christ. Pray, too, that God will give you an opportunity to talk to him. Don't argue, but simply ask him why he's chosen to turn his back on Christ. Let him know you still care for him, and that you fear for his future -- both now, and in eternity. Then, as God gives opportunity, stay in touch with him.
Most of all, learn from his example, and make sure it never happens to you. Instead, learn to walk with Christ every day through prayer, the Bible, and fellowship with other believers. The Bible says, "Resist the devil, and he will flee from you. Come near to God and he will come near to you" (James 4:7-8).