It can be very difficult when, despite our best efforts, something slips in.
I find that if I'm very clean otherwise, I can go straight to Hashem the moment it happens, and beg him not to let it affect me, not to let it land. The further into sobriety I get, the easier this gets. Just today a potential trigger walked up, stood a few feet in front of me so I could get a full view, and asked me something. I kept my eyes on her face for the briefest time possible without being rude, then looked back at my work. When she was out of sight, I put my head down and cried for a moment, begging Hashem not to let this affect me. It worked!
Hatzlocha!
Alex