Please remember you have a disease of the brain. Have you changed your meds recently? Or added any new ones? I had a bipolar friend who became totally manic for about a year. We finally tracked it down to the fact that she was on Miraplex for Parkinson's, which triggered mania. Prednisone is another drug that can trigger mania.
I know God can help you. God loves us all, and he knows the wickedness in our hearts. Despite your disease, you still need to remain faithful to your husband, and have a vibrant relationship with Christ.
I would meditate on Scripture verses, such as Prov. 3:5-6
"Trust in the Lord with all your heart, and lean not to your own understanding,
In all your ways acknowledge him and he will make straight your paths."
God is waiting for you to put your total trust in him. But please see your psychiatrist and tell him about these impulses and urges, which are overwhelming you. There may be a biological basis for them. And if not, then you do need to get down on your knees daily, and speak to God and release yourself to the power of the Holy Spirit to overcome sin.
Actually, even if the urges to do inappropriate things goes away on its own, you should still be pressing forward to know Christ better. And that means putting Jesus first in your life, and finding the time to read the Bible, to study and to pray.
"For I decided to know nothing among you except Jesus Christ and him crucified." 1 Cor. 2:2
"I want to know Christ better. I want to know the power that raised him from the dead. I want to share in his sufferings. I want to become like him by sharing in his death." Phil. 3:10
PM me if you want to talk more about this situation.