Is it a bad idea to tell your husband you're still in love with someone else even if you don't plan to leave him?

It is a very bad idea. If you do not want any change with your confession, why hurt him. He will not forget it and he will never believe that you love him too.