It will be advisable to avoid fasting or intermittent fasting if you are acutely unwell from gastritis. This is because fasting can sometimes worsen your symptoms.