What if I tell my wife that I want a divorce even though I don't?
Why would you tell that to your wife especially if you do not really mean it?
Because I have cheated on her and it will ruin my reputation if I admit it to her.
I do understand that your intentions are good for you wanting to divorce her and not want to cheat on her anymore, but I don't think that keeping your infidelity a secret is a good thing and she deserves the right to know. What you can do instead is to just tell her about your affair, and try to ask forgiveness because I feel like you really want to still fix your relationship with her.
What if she starts to make a big deal out of it? She might tell her friends that I have a bad reputation.
That is a good reason not to go through with this. You could hurt your marriage by doing what you want to do.