Torn between two men

I was previously dating this guy for almost two years. We broke up few months ago and completely unexpectedly,  this guy sweeps me off my feet and I already have strong feelings for him, but I'm in love with the other guy even though he don't make me happy anymore. The new guy and I have been inseparatable, but I still catch myself sending flirtatious texts to my ex. How do I handle this?