You can’t!
(Tip of the hat to MP Complaints Dept. ;))
Perhaps the most important thing is to disassociate yourself personally. If you take insults or unjustified arguments personally, you will get flustered and emotional. This is the kind of thing debaters and lawyers excel at. Heck, debaters have to successfully argue the opposing sides of propositions. The majority of apparent emotion is feigned, calculated to create specific reaction.
Another approach is to learn as much about the opponent’s side as possible. Just about all pro-religion arguments (and partisan arguments on most issues) can be viewed as variations on a very limited number of arguments. It can be effective to (accurately/fairly or not) to characterize the opponent’s words as something else. Don’t let your opponent choose the battlefield.
There are also all kinds of tricks you can use to get your opponent frazzled, to mischaracterize or ridicule his position. They can be very effective, but I assume you are interested in how best to present yourself in a relatively sincere exchange of views.
You have to decide what your goals are in the types of “debate” you wish to engage in. Some amount of spirited discussion is very useful in helping a person formulate his/her opinions; see how they stack up against various challenges. But once you realize what you believe, what is the point in continued debate?
Sorry to be a wet blanket, but I haven’t engaged in any religious/political/etc. debates for decades. Was PolSci major, on the college debate team, and 3 decades as a lawyer/judge. IMO, social debate most often is pointless. Do you really think you will persuade the other person? Or they you? Once you get past 30, if you have been paying attention it is pretty unusual to hear a new “argument” that will significantly change your mind. Not saying it doesn’t happen. I changed my views of capital punishment and gun ownership after age 30, but sorry, my religious views aren’t changing unless the big guy writes his name out in the stars or something.
Now, to differentiate from debate, there is value in being able to express matters you think important in as succinct and persuasive a manner possible. “Elevator speeches” to incorporate into discussions that fall short of debate. But as soon as the other person tries to ramp it up, my response is generally, “Hmm, that’s interesting. Would anyone else like another beer?”