This sounds much like IBS to me, rather than anything serious, so try not to worry too much.
Bowel changes are very common with IBS. The fact you also suffer from panic attacks/stress is also a big link to triggering IBS/bowel issues.
You mention many things that relate to IBS - loose stools/pooing several times daily swinging to a feeling of wanting to go/having the urge, but not being able to. This is classic symptoms. Also, IBS causes the bowel to tighten and spasm, which makes gas and poo release difficult, which you mention too.
There are a few things that may help. Increase your fluid intake. Increase your fibre intake (though this is a bit trial and error as sometimes extra fibre may not help, depending on whether you are more inclined to loose stools or constipation) Avoid foods that create gas and spicy foods that can trigger bowel issues.
The worst case scenario is not necessarily the issue here. It is far more likely that your current problems are related to having been unwell and stress, in my opinion. It doesn't take much to trigger bowel issues when we are suffering the things we are mentally. As an IBS sufferer and depression/GAD and panic disorder sufferer myself, I can truly confirm that!
Hope this helps! x