As far as being gay and a cop...doesn't even register a blip on my radar.
Not sure on the deal in USA with depts there, but it is not an issue here.
Obviously the discharge thing might have to be explained, and if they accept that, then good luck to you for the rest of the process. I would suggest contacting the service from which you were discharged and obtaining evidence of why you were discharged (if you don't have it already) and if that was the only reason, then I don't see an issue.
And as suggested already, best advice is to contact any depts you wish to apply for and advise them fully. Obviously it would mean disclosure, but you will have to disclose all sorts of things anyway.
BTW I am straight but do not see sexual orientation, gender, race, colour, etc as an issue in this job.
As long as you are willing to do the job, and do it to your best (and if your best is good enough ;)) then what you do on your own time, and who you do it with (as long as it is legal) doesn't effect me. I certainly do not have a high enough opinion of myself that I would think that every gay man (I am assuming you are male) would find me attractive anyway. No more than I would worry about every female I work with hitting on me (although that happens all the time :p - J/K)
The only issue I see is if you are overtly gay (and by that I mean Carson from Queer Eye). The problems that may arise are that others around you might not be too accepting and cause problems in the workplace, or more importantly, if crooks pick up on it, they will use whatever they can to either get at you, or to gain a benefit. IE, name calling etc, which we all get, or alleging you touched them innapropriately while searching them. Just food for thought.
I worked with a couple of guys in my last dept, and it was some time before I found out they were gay. They were both good cops, and that was all that mattered to me.
Good luck with the process
"He didn't want to tell the cop he was on his way to the Butt Pirate Palace for a little two-step with Joe-Joe during the Village People marathon." - Cat_Doc
"Cause when your hourglass runs out of sand
You can't flip it over and start again...Don't blink..." Kenny Chesney
"Take care, never leave home on bad terms, watch your back and go home in one piece." - Aussie Nathan
"The batton in my jacket is hot like a porn actor to beat someone down." - Patchcop