Just because you can’t go to communion doesn’t mean you can’t go to mass, as i said before, i’m pretty sure you still receive graces for just going to mass,
even though God is displeased with the sins we commit, He still loves us and longs to see us, and really if you want to receive graces, there is no better way then with the sincere and pure intention of wanting to please God and love Him in all you think, say, or do,
so by going to mass for the sake of keeping God company and adoring Him, you will surely receive an abundance of graces, and of course even more so when in the state of grace.
although you should take what you are going through seriously, do not beat yourself up, be patient with yourself because overcoming any sin is a process, it happens gradually, if you try and quit all at once or try to change to quickly, you are very likely to overwhelm yourself and relapse into your old habits even worse than before.
of course we should never allow ourselves to sin, but while we are weak in our virtues and self control, we will inevitably fall, not to say it’s impossible not to sin, but without the help of God it is.
if you want advice on overcoming your sins of impurity, then first i’d suggest learning what all sins of impurity are, and why they offend God,
here is a good article on that to start you off with if you with -
gaiaonline.com/guilds/viewtopic.php?t=13047641
the best ways to overcome sins of impurity(and any sin really) is first to pray, so that God can enlighten you and guide you, which should be every day, morning prayers are especially important, and the rosary, Eucharistic adoration is probably the most helpful and meritorious thing you can do,
then it’s important to really know your sins and the remedies for them, and form a deep hatred for your sins, so here’s a good little book for knowing your sins and how to overcome them -
fraternitypublications.com/catrexofcofo.html
another way to overcome any sin, is simply to have self control, which you develop by acts of mortification, which i also have a good article on here -
gaiaonline.com/guilds/viewtopic.php?t=13047443
spiritual reading is also very important in every Catholics life, especially the stories and writings of the saints, you just have to be careful what books you read, because there are alot of bad books out there right now,
but when choosing a Catholic book, always make sure to look inside for the “Imprimatur” the “Nihil Obstat” or the “Imprimi Potest”, because those are the ones that have been approved by the church.
so to break it down, you just need prayer, good knowledge of sins and a desire to overcome them, practice of mortification, spiritual reading, and most importantly the sacraments.
although a more perfect way to desire to overcome your sins is by wanting to overcome them for the love of God and for not wanting to hurt or offend Him, so really it’s also important each day to spend some time with God in your mind and just talk with Him, say whatever is on your mind, and He will listen, ask Him to help you to know, love and serve Him more and more each day, and also each day, say little acts of love, like “Jesus i love Thee” or “O most sweet Jesus, help me to love Thee more” just let it come from your heart, that is the kind of prayer God loves the most.
alright well that’s all for now, hope this helps, tc.