You designed it to perform in a certain way and to carry out your instructions.
Just as a car can only do what it is designed to do, the ego can only do what it is designed to do.
When your car is doing what you ask of it, driving you from A to B, it is fulfilling its function. Similarly when your ego is doing what you asked it to do, it is fulfilling its function.
It was the ego's function, as you designed it, to skew awareness away from God and to fixate on the opposite of God. Its function is to be unforgiving. Its function is murder.
Now, don't expect your ego to carry out some other function. You wouldn't expect your car to suddenly start washing your dishes and cooking dinner. It can only do what it was designed to do. And you would be nuts for condemning it for failing to come up with a 3-course meal.
Similarly with your ego, don't expect it to be not ego. Don't expect it to attempt to do anything other than it was designed to do. It's still carrying out your orders and doing what you wanted. It's something you made, just as people make cars.
Do you think the ego is ever going to turn around and say "you should apply forgiveness now", or "god loves you" or "there's nothing to be afraid of"? It's not meant to. That's not its job function. It's supposed to remind you how separate you are from everything and how death is life and how attack is salvation and all the rest of it, which it does very well.
What you can learn here is not to be afraid of the ego, because it's actually not 'against' you for no reason. It only seems to be against you because you asked it to be. You designed it to be. And its just doing what you wanted at one point in time. What you want now may be different but the ego, like an old machine, is still doing the same old thing that old machines do. They can't change.
So, in a way, don't take it personally when the ego is retaliating or being vicious. Don't think the ego is out to get you or has a will of its own or power over you. You are its master. Also don't think the ego has some kind of say or power over you as if it's deciding 'new things' about you. It's a one-track pony. It just keeps on doing what the ego does. And since you set that in motion yourself, it's actually being very faithful, a faithful servant, giving you exactly what you asked it to give you.
So now the ego is not so much your enemy, or necessarily a friend, but it is a friend in the sense that it is obedient and is doing what you made it to do. Don't be getting all up in its face about why it's being the way it's being, when you're the one who chose it. Recognizing it is serving you helps you to not only be grateful for the opportunities it presents, but also stops you from seeing yourself as victimized by it.
Maybe think of it like someone who has a serious disability or mental disorder and they really can't help it but keep blurting out swearwords... and so there they go again, swearing, but you understand they can't help it, their body is programmed to make it happen. So then it's not personal, and its forgivable because they know not what they do, and you're not a victim of it because you understand there isn't a malicious 'will' or intent that's running this. It's not someone out to get you. It's just a device mechanism behaving in a certain way.
So the ego is not your enemy, because in a way it is helping you to have lessons, to be asleep, to have a chance to choose again whether you want to be with God or not. And you hold all the power and the on-off switch to the ego machine. You get to choose whether to use the ego in the way it was designed to be used - to divide and separate and make illusions real, or whether to use it with Holy Spirit.
To use the ego with Holy Spirit is to look upon the ego simply for what it is, and recognize it as a faulty broken mistaken machine, which has no will or power of its own, which is just ticking along and doing its role. And here you are, in Holy Spirit, hearing the ego's voice and its assertions but taking the opportunity to listen to Holy Spirit's version of events.
Your sole task now is to simply choose not to listen to or believe what the ego is saying. You may hear it still, because it's not going to change its tune, but don't buy into it. Don't get caught up in it. Don't get lost in blaming it or fearing it. And don't keep using it for the original purpose you designed it for. You need to use it for forgiveness and as an opportunity to be triggered into healing, learning to listen to the Voice for God instead. The ego is just a limited mechanical robot. It's really nothing at all.
Thank you ego for being ego and for being a faithful servant of my awakening. And thank you for your efforts to attack so that I have an opportunity to learn to forgive. And thank you for guilt and fear so that I can learn that I am guiltless and fearless if I take those opportunities and work with them correctly. And I accept you as you are for what I made to you to be, and release you in freedom and gratitude.
When you are done using the ego and buying into this notion that it has power to do stuff to you that you didn't ask for, which is like a farmer saying "I didn't plant those stalks of corn" when clearly he did because they didn't get there into neat rows all by themselves, you'll set it aside as a 'toy' that you no longer want to play with or have a use for. It's as simple as that.
You're not a victim of the ego you made.