Are you acting on this attraction by going out and being alone with this guy or is this just some fantasy you have that is causing some emotional disconnect with your current partner?
If its the former than you deal with your attraction by stopping the personal interaction and contact of any kind. If it's the latter then you train your mind to immediately change the subject of him should you find yourself drifting to thoughts of him.
Whatever you do, don't be a t**t and string your boyfriend along while you flirt and try and secure this guy. That would be very shitty of you.
“The willingness to accept responsibility for one’s own life is the source from which self-respect springs.” ~Joan Didion