I deal with water retention by consistently eating a low sodium diet, 1500mg of sodium a day or less. In this way I basically don't retain water at all.
You know you're not really gaining weight, be compassionate with yourself but also realize sometimes your'e just thinking crazy at the moment, treat your negative weight gain thoughts like a not very interesting radio program playing in the background of your day.
I have focus trouble too and somehow always manage to get to my workout late which makes my lunch late & so forth. I just drop all cardio and continue my resistence training as before, or even take 2-3 days off exercising entirely. When I return to my routine I am rested and pretty much always make some serious gains because I rested when I needed to and worked hard when I was able to. You should lean on your friends/family to help you stay focused and motivated. Your fitness goals are important to you so ask others to help you in your weak moments, that's what makes communities so awesome, helping each other.
Don't feel too frustrated, if your body was ill you would rest and care for it. This is just a time where your body may have other priorities besides exercise, like if your leg was broken you might alter your activity level. You and your body are a team, you're not enemeis, you're working together towards a common goal, so trust and care for each other, it helps.