The best piece on know on how to maintain a godly disposition in theological controversy comes from a letter that John Newton wrote a pastor who was preparing to criticize a fellow minister.
The entire thing is well worth reading, but let me highlight here one section in particular on how we should think about our opponents in a controversy.
Commend Your Opponent to Earnest Prayer for God’s Teaching and Blessing
As to your opponent, I wish, that, before you set pen to paper against him, and during the whole time you are preparing your answer, you may commend him by earnest prayer to the Lord’s teaching and blessing. This practice will have a direct tendency to conciliate your heart to love and pity him; and such a disposition will have a good influence upon every page you write.
Newton observes that your opponent is either a genuine believer in Christ or he is not. And that effects the motivations for interacting with godly respect, even if it does not change the results.
How You Should Think If He Is a Believer Who Is Greatly Mistaken
First, Newton deals with how we should regard a misguided believer:
If you account him a believer, though greatly mistaken in the subject of debate between you, the words of David to Joab, concerning Absalom, are very applicable: “Deal gently with him for my sake.” The Lord loves him and bears with him; therefore you must not despise him, or treat him harshly. The Lord bears with you likewise, and expects that you should shew tenderness to others, from a sense of the much forgiveness you need yourself.
In a little while you will meet in heaven; he will then be dearer to you than the nearest friend you have upon earth is to you now. Anticipate that period in your thoughts; and though you may find it necessary to oppose his errors, view him personally as a kindred soul, with whom you are to be happy in Christ for ever.
How You Should Think If He Is an Unbeliever Who Is an Enemy of God
Second, Newton takes up the case of conversing in controversy with someone who is unconverted:
But if you look upon him as an unconverted person, in a state of enmity against God and his grace, (a supposition which, without good evidence, you should be very unwilling to admit,) he is a more proper object of your compassion than your anger. Alas! “he knows not what he does.” But you know who has made you to differ. If God, in his sovereign good pleasure, had so appointed, you might have been as he is now; and he, instead of you, might have been set for the defence of the Gospel. You were both equally blind by nature. If you attend to this, you will not reproach or hate him, because the Lord has been pleased to open your eyes, and not his.
You will not regret reading the whole thing.