Algae blooms can be caused by an excess of nutrients in the water or too much light ie sunlight getting in to the tank.
Green water sometimes can be resolved by a total blackout of the tank for 3-7 days, or most certainly by adding a UV steriliser to the tank. Algae in your water will reduce the amount of oxygen available to fish. I suggest you add an airstone.
I doubt that your gourami died from a lack of oxygen as being a labryinth fish it did not require as much oxygen as your harlequins.
Perhaps a test of pH, ammonia, nitrite and nitrate would be beneficial.