Here is something that might be helpful
The Devil, dearest daughter, is the instrument of My Justice to torment the souls who have miserably offended Me. And I have set him in this life to tempt and molest My creatures, not for My creatures to be conquered, but that they may conquer, proving their virtue, and receive from Me the glory of victory. And no one should fear any battle or temptation of the Devil that may come to him, because I have made My creatures strong, and have given them strength of will, fortified in the Blood of my Son, which will, neither Devil nor creature can move, because it is yours, given by Me. You therefore, with free arbitration, can hold it or leave it, according as you please. It is an arm, which, if you place it in the hands of the Devil, straightway becomes a knife, with which he strikes you and slays you. But if man do not give this knife of his will into the hands of the Devil, that is, if he do not consent to his temptations and molestations, he will never be injured by the guilt of sin in any temptation, but will even be fortified by it, when the eye of his intellect is opened to see My love which allowed him to be tempted, so as to arrive at virtue, by being proved. For one does not arrive at virtue except through knowledge of self, and knowledge of Me, which knowledge is more perfectly acquired in the time of temptation, because then man knows himself to be nothing, being unable to lift off himself the pains and vexations which he would flee; and he knows Me in his will, which is fortified by My goodness, so that it does not yield to these thoughts. And he has seen that My love permits these temptations, for the devil is weak, and by himself can do nothing, unless I allow him. And I let him tempt, through love, and not through hatred, that you may conquer, and not that you may be conquered, and that you may come to a perfect knowledge of yourself, and of Me, and that virtue may be proved, for it is not proved except by its contrary. You see, then, that he is my Minister to torture the damned in Hell, and in this life, to exercise and prove virtue in the soul. Not that it is the intention of the Devil to prove virtue in you (for he has not love), but rather to deprive you of it, and this he cannot do, if you do not wish it. Now you see, then, how great is the foolishness of men in making themselves feeble, when I have made them strong, and in putting themselves into the hands of the Devil. Wherefore, know, that at the moment of death, they, having passed their life under the lordship of the Devil (not that they were forced to do so, for as I told you they cannot be forced, but they voluntarily put themselves into his hands), and, arriving at the extremity of their death under this perverse lordship, they await no other judgment than that of their own conscience, and desperately, despairingly, come to eternal damnation. Wherefore Hell, through their hate, surges up to them in the extremity of death, and before they get there, they take hold of it, by means of their lord the Devil. As the righteous, who have lived in charity and died in love, if they have lived perfectly in virtue, illuminated with the light of faith, with perfect hope in the Blood of the Lamb, when the extremity of death comes, see the good which I have prepared for them, and embrace it with the arms of love, holding fast with pressure of love to Me, the Supreme and Eternal Good. And so they taste eternal life before they have left the mortal body, that is, before the soul be separated from the body. Others who have passed their lives, and have arrived at the last extremity of death with an ordinary charity (not in that great perfection), embrace My mercy with the same light of faith and hope that had those perfect ones, but, in them, it is imperfect, for, because they were imperfect, they constrained My mercy, counting My mercy greater than their sins. The wicked sinners do the contrary, for, seeing, with desperation, their destination, they embrace it with hatred, as I told you. So that neither the one nor the other waits for judgment, but, in departing this life, they receive every one their place, as I have told you, and they taste it and possess it before they depart from the body, at the extremity of death – the damned with hatred and with despair, and the perfect ones with love and the light of faith and with the hope of the Blood. And the imperfect arrive at the place of Purgatory, with mercy and the same faith.
The Dialogue of St. Catherine of Siena (pp. 51-52)