I think it's important to listen to your body, especially when dealing with gastritis. Fasting may have benefits for some people, but longer isn't necessarily better, and there isn't one fasting duration that's safe for everyone. If going without food makes your stomach symptoms worse, I wouldn't push it. Have you noticed whether your gastritis gets worse when your stomach is empty? It might be worth discussing a safe approach with your doctor.