You need to break the link of feeling you want to eat to solve the problem.
Food serves one purpose only which is fuel for our bodies, however as children we are taught food is a solution to everything - screaming child? Give it sweets. Got a boo boo? Give it sweets. Had a celebration? Have some food. Had a bad day? Treat yourself to some food. Meeting up with friends? Have a meal. It's a vicious cycle where we use food as a common ground for our problems. No one ever walks in and says "man, I've had a rough day, pass the fruit bowl and a bottle of water!"
Whatever the problem, the solution is not in the fridge.