I know WELS and other confessional Lutherans don't ordain practicing homosexuals. But I wonder if confessional Lutherans would ordain persons who have homosexual temptations yet live a chaste life. What about a bisexual man who is married to a woman, yet repents daily of his homosexual thoughts and struggles against it like he does with his heterosexual lust? Is this man automatically excluded from the office of the keys because of his sinful sexual desires, even if he doesn't live them out?
The Bible does teaches that people can transgress God’s holy law by their thoughts (Matthew 5:28; 1 John 3:15). Being tempted with thoughts of breaking the fifth and sixth commandments (the content matter of those Bible passages) would not disqualify a person from serving in the public ministry. The same would be true of a person being tempted with thoughts of breaking any other commandments of God.
If not checked, sinful thoughts of course can lead to sinful actions (James 1:13-15), and some actions can disqualify a person from serving in the public ministry (1 Timothy 3:1-7; Titus 1:6-9).
We can put your questions in perspective by keeping mind that God alone knows our thoughts (Psalm 139:2). No one will know our thoughts unless we share them with others. At the same time, we want to recognize that God’s will is that we have pure thoughts (Psalm 51:10; Philippians 4:8).
Your questions underscore the need for daily repentance. When we confess our sins, God responds with the message of the forgiveness of sins through his gospel (1 John 1:9). We have forgiveness because Jesus was perfect in our place (Hebrews 4:15; 7:26). He had no impure thoughts. He took our sinful thoughts and words and actions to the cross, and received the punishment those sins deserved (Isaiah 53:4-5). God’s forgiveness now provides strength and motivation to lead holy lives and to resist temptations to sin (2 Corinthians 5:15).