The same exact thing happens to me. After starting this NoFap thing, I have had no panic attacks or depression. I feel amazing, better than I ever have. Anxiety/Panic attacks are directly related to porn/masturbation bro. There is tons of science behind why (brain secreting way too much serotonin etc.) And then the spiritual aspect, it invites really bad things into our lives looking at that stuff. Stay motivated bro, you'll overcome!