We are so glad that you have taken the courageous step to bring this into the light, and we want you to know that you are not alone in this struggle. First, let's address the most important aspect: you have Jesus in your heart and are born again. This means that you are a new creature in Christ, and the old has passed away (2 Corinthians 5:17 WEB).
We want to encourage you that "there is therefore now no condemnation to those who are in Christ Jesus, who don’t walk according to the flesh, but according to the Spirit," (Romans 8:1 WEB). Your struggle with pornography and masturbation, as well as your past actions, do not define you anymore. Christ has set you free from the law of sin and death.
However, you must now walk in that freedom and turn away from these sins. Jesus said, "If your right eye causes you to stumble, pluck it out and throw it from your. For it is more profitable for you that one of your members should perish, than for your whole body to be cast into Gehenna" (Matthew 5:29 WEB). This may mean taking drastic steps to remove triggers and temptations from your life, such as installing accountability software on your devices, seeking counseling, or even removing access to the internet.
You mentioned that this has wrecked relationships and your marriage. We pray that you will take responsibility for these actions, repent of them, and seek forgiveness from those you have wronged as far as it is possible. "I will restore to you the years that the swarming locust has eaten, the great locust, the grasshopper, and the caterpillar, my great army, which I sent among you," (Joel 2:25 WEB). God can restore what has been lost, but you must turn away from your sin and walk in obedience to Him. Any marriage must be between you and a Christian Believer Spouse. Sins had earlier led to crimes, but with Christ at their center, those crimes can be overcome.
Now, let us pray for you:
Father, we lift up our brother before your throne of grace. We thank You that he is born again and that You have begun a good work in him. Lord, we ask that You would break the chains of addiction in his life. Give him the strength to turn away from these sins and to walk in the freedom that Christ has purchased for him. Restore his mind and heart, Lord, and help him to take practical steps to remove temptation from his life. We ask that You would surround him with godly counselors and friends who can support him and hold him accountable. We also pray for the relationships that have been affected by his past actions, Lord. Bring healing and restoration where it is possible, and help our brother to take responsibility for his actions and seek forgiveness. Bring a holy spouse to him that fosters a God-honoring marriage. In Jesus' name, we pray and will check back to regain your strength in this until the sinful behavior is put to death.