Although mixing with headphones is something I wouldn’t recommend to do there are situations when you’ve got to go for it. So let’s see what’s wrong with it and how you can compensate for the disadvantages.
When you listen to music through headphones you experience a quite unnatural ‘in your head’ sound. First, room acoustics is totally excluded which results in a dull and fully dry sound. Second, the sound doesn’t come from the front but goes directly into your ears which causes total stereo separation. Also, your ears respond to sound pressure coming from speakers differently then when coming from headphones. That’s quite bad so far… But here comes the good news!
To compensate for the undesired side effects of listening to music through headphones you can use virtual speaker simulation tools. Most of them operate with head-related transfer functions (HRTF) under the hood to simulate acoustical transfer from loudspeakers to ears and reflections from the human body, and binaural room transfer functions (BRTF) to simulate room reflections. For me the most convincing results were produced by the now discontinued Focusrite VRM box. My second choice would be TB Isone by Toneboosters which is a binaural room simulator in VST plugin format. Other options cover (not exclusively) 112 dB’s Redline Monitor, G-Sonique’s Monitor MSX5 or Beyerdynamic’s Virtual Studio. For best results you should use high quality headphones with a full band flat frequency response especially designed for pro audio applications.
Still, I wouldn’t solely rely on such a tool during a mixing session. However, I would recommend using it to double check your mixes to hear how they would sound in various listening environments. Also, if you don’t have a decent loudspeaker based monitoring environment you’ll most probably produce better-translating mixes by using a speaker simulator when monitoring through headphones.