Hey,
It's totally understandable that you are feeling concerned about starting the medications again after having mixed experiences in the past. The medications likely prescribed by your gastroenterologist maybe SSRIs or related anxiolytics and they don't generally harm the kidneys in a healthy individual with normal renal function. However, i recommend you to review your medications, lab reports with a psychiatrist in detail.
Next Steps
I recommend consulting a psychiatrist for a personalized review. We can guide you on exploring your issues in detail and also provide you with other psychological therapies which can complement the medications and help you in long term.
Take care and feel free to follow up for more clarity.