Baby in pain - please help

So

Girls, I’m at loss here. I haven’t slept for 2 weeks. I cry constantly because I don’t know what’s wrong with my baby. My 6 month old started to wake up completely hysterical at night (4-5 hours after last feed). He’s on formula and started solids. Actually, we started solids at 4.5 months but stopped because he drastically decreased his intake of formula. Then, at 5 months he started waking up at night but not every day. Some days were good and some were bad. But now, at 6 months his crying fits began every single night. I can feel he’s in pain. Some nights I give him baby panadol and it helps. But I can’t give it to him every night can I? He also decreased his formula intake and weight gain significantly (gained 300 grams in 1 month). I don’t know what to blame, solids, teething or something else. He’s rubbing his nose, drooling all the time and gnawing on things constantly. But I read teething pain only lasts for 4 days before the tooth cuts through? He’s been like this for a month now and still no teeth. These last two weeks have been intense. He’s getting harder and harder to console. And he only cries before bed or after 4-5 hours of sleeping.

Our doctor prescribed some gas drops which obviously don’t help. He thought maybe he has tummy ache from starting solids because it strangely coincides with decrease of appetite. But we don’t know why only at night. I’m taking him to a different pediatrician tomorrow because I don’t know what else to do. Every night became bitter for me because he seems in so much pain (eyes shut, fists clenched, legs straight or kicking, angry screams and lots of tears. Sometimes he cries with his mouth shut) and I don’t know how to help. Any idea what it could be? Can teething pain be that intense and last that long?