How can I stop myself from binging or snacking when stressed?

Do something else. Try to do something else to relieve the stress. Preferably something incompatible with binging - for example exercise. It's hard to binge when you're working out. Later when you're tired try to determine how you can avoid the stress in the first place.