I know you can't predict your own depressive periods, but you should've thought long and hard about the uni you chose to go to. It's clear from your post that you wouldn't be able to afford accommodation, so what made you think that four hours of commuting a day was able to compensate? Really, you should have chosen a uni closer to home so that you wouldn't miss any lecture intentionally and others would know how you got on