You will not perish on account of thoughts with which you do not sympathize and from which you at least try to be freed. Only repent, & humble yourself. And God will forgive you.
The nature then of Christ's teaching is attested by His own holy statements: that they who wish to arrive at eternal blessedness may understand the steps of ascent to that high happiness. 'Blessed,' He saith, 'are the poor in spirit, for theirs is the kingdom of heaven.' It would perhaps be doubtful what poor He was speaking of, if in saying 'blessed are the poor' He had added nothing which would explain the sort of poor: and then that poverty by itself would appear sufficient to win the kingdom of heaven which many suffer from hard and heavy necessity. But when He says 'blessed are the poor in spirit,' He shows that the kingdom of heaven must be assigned to those who are recommended by the humility of their spirits rather than by the smallness of their means.
When it is needful that a person be humbled, then not only the Superior, the sisters, strangers and near ones, but even all creation, according to the words of St. Isaac the Syrian, will rise up against that person.
Accordingly, a man will neither be puffed up through pride, nor cast down by despair, if he uses the good things divinely bestowed on him, to the glory of the Giver; withholding his desires from the things which he knows will hurt him. And so he that would preserve himself from the wickedness of envy, from the corruption of sensuality, from the unrest of anger, from the desire of revenge, will be purified by the sanctifying power of true abstinence, and will taste the joy of imperishable delights, so that by making spiritual use of them, he will learn to change earthly possessions into heavenly, not by storing what he has received, but by multiplying more and more that which he has been given.
Observe your thoughts, and beware of what you have in your heart and your spirit, knowing that the demons put ideas into you so as to corrupt your soul by making it think of that which is not right, in order to turn your spirit from the consideration of your sins and of God.
Apostolic teaching, Beloved, exhorts us that we put off the old man with his deeds (Eph. iv. 22; Col. iii. 9), and renew ourselves from day to day by a holy manner of life. For if we are the temple of God, and if the Holy Spirit is a Dweller in our souls, as the Apostle says: You are the temple of the living God (II Cor. vi. 16); we must then strive with all vigilance that the dwelling of our heart be not unworthy of so great a Guest.
But a sober and prudent man who desires to be saved, when he sees from what it is that he suffers harm, carefully preserves himself from evil remembrances, is not drawn into passionate thoughts, avoids meetings and conversations with those for whom he feels attraction and avoids every occasion for sin, fearing lest he himself ignite a fire within himself. This is the warfare which proceeds from one’s own lust, which a man brings on himself
Concerning fasting, do not grieve, as I have said to you before: God does not demand of anyone labors beyond his strength. And indeed, what is fasting if not a punishment of the body in order to humble a healthy body and make it infirm for passions, according to the word of the Apostle: 'When I am weak, then am I strong' (II Corinthians 12:10).
When anyone is disturbed or saddened under the pretext of a good and soul-profiting matter, and is angered against his neighbor, it is evident that this is not according to God: for everything that is of God is peaceful and useful and leads a man to humility and to judging himself.
Watch constantly, learning to understand God's law, for this warms the heart with heavenly fire. Guard your lips from the idle word, or empty talk, lest the heart gets used to evil words.
Acquire humility, which scorches the demons, obedience, which opens the door for the Son of God to enter a man, faith which saves a man, hope which makes him unashamed; and love which lets not a man fall away from God.
St. Peter of Damascus teaches, 'When joy comes, represent sorrow to yourself; and when you are encompassed by sorrow, try to awaken joy.' Thus you will be safeguarded both against deception and against despair.
If thou, being offended by anything, dost sense that grief and wrath have seized thee, preserve silence, and say naught until unceasing prayer pacifies thine heart.
Compunction comes when you consider how much you have grieved God Who is so good, so sweet, so merciful, so kind, and entirely full of love; Who was crucified and suffered everything for us. When you meditate on these things and other things the Lord has suffered, they bring compunction.