Santosh,
Sorry for the brief, humorous interlude from my compatriots.

St. Paul had a very similar question. It is found in Romans 7:15-24. Here are some excerpts:
"I don't really understand myself, for I want to do what is right, but I don't do it. Instead, I do what I hate. ... I want to do what is good, but I don't. I don't want to do what is wrong, but I do it anyway. ... I have discovered this principle of life --- that when I want to do what is right, I inevitably do what is wrong."
Paul goes on to diagnose the problem. He writes,
"But if I do what I don't want to do, I am not really the one doing wrong; it is sin living in me that does it. ... I love God's law with all my heart. But there is another power within me that is at war with my mind. This power makes me a slave to the sin that is still within me."
When we read this, we often personify sin making it an independent, separate will. But that is not what is meant here. The power of sin is the habits, tendencies, addictions, thought patterns and social training that we have cultivated before we made the decision to follow Christ. Psychologists tell us that by the age of four over 90% of our values are already set and are based on what we saw and heard from our parents (this is the truth behind the verses in the Scriptures that the sin of one generation is passed down to the next and so on --- we learn them at a young age from our parents). Our society defines what sexuality is and we take in hours and hours of it and soon find it effecting our thoughts and values. And sin itself can produce a pleasure that is addicting to the soul, which is also the power of sin. Pornography, for example, is now considered by psychologists and sociologists to be as addictive as cocaine because of the chemicals released in our bodies when we look at these pictures. Anyway, you get the idea. There is a "power" to "sin" that wars with our desire to do what we believe is right.
Paul, after diagnosing the problem, writes
"Oh, what a miserable person I am! Who will free me from this life that is dominated by sin and death?"
And if we stop there, it is a miserable situation and one of no hope. But Paul doesn't stop there, he then writes ...
"Thank God! The answer is in Jesus Christ our Lord."
Notice two things. The answer is NOT Jesus Christ, but it is "in" Jesus Christ. And two, if this is the complete answer, then we are still in trouble. For too long, some Christian teachers of being giving this simple answer, and it doesn't help a lot of people. But Paul didn't give a simple answer and he didn't stop there. Paul goes on to write ...
"So now there is no condemnation for those who belong to Christ Jesus."
In other words, don't condemn yourself for your failings and don't let others condemn you, because Christ already knew that you would fail and yet he loved you and accepted you when you came to him. Condemnation robs us of energy, focus and progress. It is never, ever beneficial (conviction is, but not condemnation). Stop condemning yourself. But that isn't enough. Paul goes on ...
"And because you belong to him, the power of the life-giving Spirit has freed you from the power of sin that leads to death." In other words, there is now a spiritual connectedness (this is why it is "in" Christ for it is Christ's Spirit), that "leads" you and "helps" you to do and go the right way.
So how do we transition from the "wrong" thoughts to the "right" thoughts? Here are some things to thing about:
1) Paul writes in Galatians 5 that we are to yield ourselves to the leading of the Spirit. Each day say a simple prayer asking the Spirit to help you to choose the "good" thoughts and not the "bad". Give Him permission to speak loudly into your soul when needed. And then try each time to follow His leading. You will find it harder at first, but it will become easier as you go along.
2) Paul writes in Romans 12 that we need to be "transformed" through "the renewing of our mind". How do we change the way we think? Through the Scriptures as brought alive by the Spirit. Look for Scriptures that address the areas you have the hardest time with. Memorize and meditate on those scriptures. Ask the Holy Spirit to bring them to your remembrance as you go through these situations.
3) And no condemnation when you fail. You are already forgiven. Just ask God to forgive you and to help you as you continue on the journey of becoming more like Christ.
4) If a habit or thought pattern becomes too difficult to break, then seek out someone who loves you and you can trust, and ask them to be an accountability partner with you. James wrote that we should confess our sins to one another. And then have your accountability partner pray for you and with you as you continue to grow and overcome a particular habit.
I know this is kind of long, but I wanted to give you some scriptures and some practical ideas on how to begin the journey of "renewing the mind". At the least, maybe this will give create some other questions or comments that might help you your questions.