Please stop feeling bad about yourself. As already mentioned, that "gain" is water retention. You would have to eat huge quantities of food to actually add that much fat. You are on meds and your body is healing, which upsets the water balance.
And even if it were true, those negative emotions just feed bad habits and if you are an emotional eater, could trigger a binge. If you ever have a real gain, just step away from the negative emotions, review your fitness and exercise logs and move forward. Don't waste your energy or focus bringing yourself down. Be your own cheerleader instead.