Dude, that sucks.
I'll give you a bit of advice, if you don't mind. A few of us here served Mormon missions. Now, I am not saying that is directly analogous to being in a war in a foreign land - but from the things you mentioned (specifically homesickness), there are definitely some comparisons to be made.
When I first realized that I was not going to see anyone I knew for two freakin' years, I wondered what in the heck I had done. I started really considering things I could do to go home. For example, I would think about "accidentally" stepping in front of a moving car. I would speculate about how fast it would need to be going to break a few of my bones, but not kill or permanently injure me. I was more miserable than I had ever been in my life, and that misery lasted the first five or six months I was out.
What I learned was that constantly thinking about my misery made it much, much worse. And the only way for me to stop thinking about it was to stay busy. So, I just immersed myself in work. I really tried to discipline myself to work from the time I got up until the time I went to bed. And I'll tell you what - the time flew by. And, to boot, I developed some great personal habits in the process.
I guess what I'm saying is concentrate while you are there on doing your absolute best at everything you tackle. Even if it seems insignificant in the big scheme of things, attack it like it's a great opportunity for you. The time will move by much faster; your career (if you want a military career) certainly won't be hurt by your working your butt off; and you will come home feeling like you grew a ton personally while you were there. Going through the motions and "just getting by" will make it seem like a prison sentence.
Anyway, I hope I'm not being presumptuous in giving the advice. I was just thinking that I wished a friend had given similar advice when I was contemplating stepping in front of that car.
No matter what, stay safe!