I would start with a liquid diet to settle things down. That would be clear liquids like brewed low-caffeine or caffeine-free teas (green tea is great for settling your stomach and you can get it decaf), broth, water, Gatorade, and stuff with very little sugar. Do that for a few days and rest. Your digestive system needs time to heal, especially if it's something with your colon.
Then move on to a low-residue diet. You can look up to see what that is, but it will still include clear liquids. It's low in fiber, no fats, no dairy, and is very easy on your digestive system. You can have Cream of Wheat, white rice, pasta, refined crackers, refined breads, refined cereals, refined pancakes and waffles, all with up to .5 grams of fiber per serving. You can have well cooked canned vegetables that don't have skin or seeds. Vegetable or fruit juice without pulp or seeds. Apple sauce, ripe fruits without skin (but not pineapple), yogurt, legumes, any kind of beans.
You would have to stay away from anything with seeds in them such as sauces with tomato seeds, fruits with seeds like raspberries and strawberries, cucumbers, cherry tomatoes, dried peas, dried beans, nuts, peanut butter, salad dressings with seeds, bagels with seeds. No coconut, nothing made with whole grains where you can see the grains because they're like seeds. No dried fruit. No popcorn, no pickles, no meat. Absolutely NO CORN.
Do the low-residue for a week... 7 days. See if your digestive system feels better. After that, add in roughage... that would be things like carrots and broccoli and salads. Add in more fibers like shredded wheat, bran, oatmeal.
Keep a food diary so that when you add new foods back into your diet you'll be able to tell if a particular food triggered the reaction. For me, we discovered that foods with seeds were a huge problem and I can't digest them. It was one way we discovered that I have diverticulitis.
Get a good Gastroenterologist. They should do an upper GI on you and a colonoscopy. They should also check for acid problems in your stomach. They can help you with getting you in touch with a dietician to help you figure out a proper diet once they figure out what the problem is, and target a better low-residue diet for you. I know it's donkey balls to go through this. I went through it for almost six years as it gradually got worse before seeing a doctor. Don't wait as long as I did.
Diverticulitis, Diverticulosis run in my family so we were able to narrow it down to those. We also tested for Crohn's disease and Celiac, but going gluten free (for me) was colossal waste of time. And also for me, the Diverticulitis/osis was early onset because of my Fibromyalgia. Fibro is a chronic pain disease that affects nerve endings as well as joints and muscles, but it also affects the digestive system and makes one immunocompromised. If you happen to have chronic pain issues, consider that this could be connected. Improvements in my diet such as cutting out fats, sodas, junk foods, HFCS, food dyes, Splenda, fake sweeteners, trigger foods have helped as well yoga.
I wish you lots of luck.