If you're in an unsafe state, physically or mentally then don't do the work out or at least modify it down a notch.
That being said, you need to do two things.
1. Review your diet. Not getting enough quality calories at the right intervals will contribute to fatigue and impair your ability to recover. If you aren't keeping a log, then start.
2. Plan out your week as thoroughly as possible. Layout each day w/ what you have to do and when. Workout late, workout early, workout midday, whatever you have to do to fit it in. Remove any activities that don't aid your success. For me, that was Xbox 360 and Call of Duty
My wife and I sit down on Sunday and plan a menu and our workouts. We fit everything in so we can maintain some sanity between jobs, kids (their sports, activities, etc)and anything else that pops up. If you plan out your week it will make it easier to know what you need to be doing and when. Less wasted time means more time for sleep too! Try to schedule 8hrs if at all possible!
If after doing that, and excuse my bluntness, you are still struggling then perhaps your fitness level wasn't adequate to start P90x. If you're still struggling you should consider shifting gears a little. Either do the "program" in a modified way that doesn't run you ragged or find a different program more suitable for your level of fitness. After a month or so, if you feel like you can stick closer to X then restart the program and go balls to the wall.
To paraphrase Tony from the first workout "...don't let pride or ego prevent you from reaching your goals". It would be much better to start and finish X the way you want a few months later than originally thought than to burn yourself out and not be able to finish.
Either way, your mental attitude will see that you achieve success but sometimes you have to recognize your current limitations and take a step back, figure out how to beat them and then stomp em!
Hopefully this will prove helpful!