Hello,
You are not the only one who has to deal with these issues. Don't worry, God still loves you and wants you to be close to him. So let's help you out a little.
In order to grow closer to God you must nourish your faith. You've already taken a big step in admitting your weaknesses and asking for help. Nourishing your faith includes more than just going to church, anyone can do that. You have to be willing to say to God: "Lord, I've seen what the world has to offer and I find no value in it. God, as it is written in your Word, you are the only thing that can bring me real rest." and you have to mean it.
You see, searching for God and willing to change for Him is the hardest part of this, but once you achieve it, your life will be easier than ever before! Take that from me, I was a false Christian for nearly half my life, and it sucked.
Another step is that you must realize WHY God is not to blame for your problems. God isn't a deity that sits in the clouds deciding who's day He's going to make miserable. You see, it's people like you and me that are screwing this world, because we have a hard time resisting sin. If it wasn't for the pain we humans have brought on ourselves, then we would be living in a perfect world with God and His true intention for us. You see, God wants us to have everything He intended us to have: eternal life, wealth, and power with which we can govern according to His Law. But we can't get these until we have solved our own problems and stopped blaming God for it. Again however, you MUST have FAITH that He will help, otherwise you won't find it. After all, you can't find something if you question it's existence. God is real, take it from a person who has seen His miracles.
Let's continue with an easy one: taking the Lord's name in vain. I did this for a long time and I can tell you it is one of the easier ones to break. Just make a hard effort to catch yourself everytime you do it, and reprimand yourself whenever you do. After a little while, you will eventually be able to prevent yourself from ever saying it.
I used to question God a lot too. One day, however, I realized that I'm just a man, and a young one at that. I mean, what do I know about the world when I'm a mortal complaining to the one who created it? God knows this world like the back of His hand, and His intentions are always good.
As one of my brothers once told me when God puts us through a tough situation with your faith life, it's because He wants to mold you into something else. Haven't you ever been through other bad times to later realize that they helped you out a lot? Just think, God loves you enough that He thinks you are worthy of a test from Him! It means you have great potential to be a warrior for Him.
Trust me, if you give whatever troubles you have to Jesus Christ, He will rid you of them. You just have to be patient for His reply. You can call on Him at your desire, and He will hear you.