Hey man,
Like you I am experiencing great troubke with relapses. Stay strong! I know how pulled down you feel. I know have made myself a mindset that I have to and will stop myself from relapsing because I have been stuck in a depression and need to get out.
Remember what you are in this for. You're breaking free. All those times you tried and failed, now you are able to go for weeks without P or M. Thats a damn fine achievement my friend.
To escape from the loop of relapse I have a couple of tips for you:
-WRTIE YOURSELF SOME RULES. Seriously discipline yourself on these rules. They help with something else to say no when you have those irresistible urges. They also keep you on track and stop you from deliberately looking for triggers.
-KEEP BUSY. Really important. I'm sure this is the same for you, but I tend to easily give in when I have time on my hands. If you have a hobby or keep youself busy with study or any other commitment things will get easier.
-ADDRESS URGES INSTANTLY. This one is part of my rules. If you can catch it early it's easier. Distract youself with something engaging or IMMEDIATELY take a cold shower or some physical activity like running or explosive pushups. This must be done straight away without hesitation if it's going to work.
- STAY FOCUSED, STRONG, AND HAPPY! Remember how awesome it is that you are breaking free. Concentrate on your goals and what you are escaping. Imagine how great things would be without worry. Tbh I'm really excited about that time. Life will be amazing for both you and I. But keep your chin up and keep pushing through the tough times to get there
Best of luck my friend,
-Sam