To change unhealthy behaviors, it is important to first identify your cues or triggers to overeating at a meal or snack. We are not much different than animals where a stimulus occurs followed by a certain response. If we do it long enough or frequently, then the response can be automatic. Examples of triggers for inappropriate eating are boredom, loneliness, wanting to be sociable, etc.
One way to identify your triggers is to keep a diary of what drives you to eat unhealthily. You may be able to then substitute another behavior instead of the eating. For example, if you have no plans on a certain night and can anticipate feeling bored or lonely, perhaps you could call a friend, rent a movie, or read a stimulating book.
To be sociable, perhaps you could meet friends at a coffee shop or a gym instead of having a large meal out. Nothing may take the place of food, but some behaviors can compete with eating!