Keep healthy. Here are wise practical details. Take plenty of exercise, but not too much. Men often fail when tired out. Avoid heavy meals— especially late at night. Take cold baths daily. Do not lie in bed after waking. Avoid quacks like the plague. Beware of the reactions that follow emotional excitement. Work off your emotions in positive ways. Emotionalism has danger in it.
Learn to pray for the right thing, not for deliverance, but for strength for victory. Learn to trust God in all things—in this among others.
If you want to prevent the thing from obsessing you, you must not let your failures obsess you. Turn your back on them. The only way to drive out one thought is to put another in. An attempt merely to shut down is doomed to failure. Concentrate on active life and service. The truth is, you cannot have the help of Christ just for the cure of this evil. Give yourself wholly to Him, and you will find He has set you free. You cannot bring religion in just for a part of life. If your whole life is in God's hands this trouble will disappear.
Lastly, a word to the man who is down and out.
God is strong enough and near enough for this never to happen again if you will let Him have the whole of you—not body only, but mind and heart and life. But if you do fail again, do not despair, do not blame God, and do not say or think that He has finished with you.
God's love is such that He will never turn from you if you turn to Him. God is no farther from the failures than from the successful. He cares as much for those who fail.
The real and ultimate danger of this thing is not danger to your mind and body, but the danger that it may come between you and God. Wherefore come back to God every time.
Remember, whatever the past has held, there are still great possibilities of happiness and victory before you through the power of God.
Others are in as great difficulties, and others who were in them have won through to victory. There is reason for hope.
We are not meant always to stand alone. Two are more than twice as strong as one. Perhaps you should share your difficulty. Only do not make it an excuse for getting mawkish sympathy.