It'll never fully go away.
But understanding the triggers helps.
For me, I stood in front of the candy Isle and looked at all the candy that I love, and internally said "F you candy, you are tasty but you are not good for me, you only work to make me feel like crap, yes, I'll enjoy you for a moment, but the damages you cause are not worth the momentary good taste."
I confronted everything I wouldn't be able to or shouldn't eat again, head on.
It's helped out greatly.
I also found swaps for things. Finding something that will satisfy the craving while still being within your diet restrictions helps greatly. I was a HUGE Ice Cream guy. Can't do that crap anymore, I found Halo Top "ice cream" that's super low in calories and fits my post bypass restrictions. I typically only eat 1/8th of a pint or so, but even if I ate the whole pint, it's still only a max of 320 calories or so. Things like that, find things you can substitute for the bad stuff. It helps get you through the mental BS. It did for me anyway, maybe it'll work out for someone else.