Yes of course because we are human beings and we have mood swings issue due to personal reasons and most of times it is due to surrounding environment, so work when your mind is relaxed and you are tension free. But make sure your mood doesn't effect your work