Caffeine and nicotine are drugs. Nicotine is one of the most psychologically addictive drugs.
Caffeine can be; as I found out over 2 decades ago, physically addictive in high doses over time.
I ran out of coffee and had no way to get any for almost 24 hours and being use too having 3 or 4 pots of coffee a day; as I found out, can cause a massive( worse than a typical migraine headache, type of headache where I was truly unable to function normally from the awful pain which was resolved when I got more coffee. I actually had to do a coffee taper.lol
I have only been to Starbucks once. For a bagel. Never for coffee. But judging by prices and the long lines, I would say that they are almost like drug dealers,lol. Seriously look at cost and the wait people will go through, to keep getting their specialty coffees or whatever.
So you take a bunch of needed meds and others that just seem to help.
This( I am on a number of meds and my doctor would have me on more if I let him). This becomes a part of your life. When you take them away, some might cause catastrophic and potentially fatal problems( your diabetes meds, depending on how severe and whether you are insulin dependent or not) but serious problems any which way. The truly needed meds get added onto meds that help your medical problems or keep you from going on a mentally ill psychotic episode.
Then add in other med which may not be needed to live but make you able to function. Pain meds for some, like me and you, able to function. This and other meds are make medical problems more bearable.
Then the doctors give you other meds that help with other symptoms and sometimes these are to reduce the problems with other meds.
So then your body becomes physically dependent on drugs like pain killers, benzos, anti depressants, ect...
Then throw in other meds to that the doctor prescribes for high blood pressure, high cholesterol, ect...
These become routine. Throw in caffeine for energy and nicotine because well you like all smokers are addicted to it.( almost all, and people that only smoke when they drink don't count, unless they are a total drunk.)lol.
Then you end up on so many meds that when you feel like shit you are not even sure which drug you maybe having issues with.( tolerance builds up, forgot to take this or that, ect....)
Then you end up totally dependent on so many drugs it is ridiculous.
If I were on as many drugs as my doctor has me on and would be willing to use more, it would hit double digits( nicotine included)( he wants me to stop that, but take other meds also)
So, then it is time to take an inventory of your meds. Ok, I will die if I stop this or get really sick( not withdrawals, I mean diabetes meds in your case) Then meds like pain killers that make medical conditions bearable. Then there are the ones that seem to be helpful such as hugh vitamin D mega doses,high blood pressure meds, cholesterol meds( not on them but my doctor wanted me to be, but this was an anomaly in my eating habits which I am trying to correct).
Anyways you have this whole long list of drugs.
Which ones can you cut out, without any major issues?
I ask this because many times people are over medicated on stuff they don't really need.
You, like I am trying to do; is to cut out those that aren't necessary. Nicotine is one of them, but quitting is hard. Also it helps with times I can't physically eat.
Then there are pain meds which make me functional and another drug that could kill me if I quit taking it. Then there are other more helpful drugs like meds for high blood pressure.
Then you start to look at all you are on or what you take and the doctors think you could use but are not necessary.
I have trimmed down and refused meds I don't need.
Then there are meds that make my life more bearable. Then that is where the issue of cutting down is a problem.
Can you cut out caffeine and nicotine? Can you live without morphine( and still function)?
What about the psychological type meds. Are they to treat a real mental disorder; if so, then they are necessary.
Take an inventory of all you take and find the ones that are non-negotiable, such as diabetes meds, any truly needed psych meds, ect....
Then look at meds that are helpful and don't have any risk.
Then see what you can realistically cut out.
That list becomes small. I have two bad medical conditions that make certain drugs basically needed to function normally. Then there are the drugs I have refused or cut out.
I am left with cigarettes.

, that is really an issue. Because it helps at times, when my pancreatitus keeps me from eating and makes it bearable.
So then you look and then you realize, shit I am a mess but what can I do.
I don't know all the drugs you take, but if they are needed and the ones that make life bearable are included what is left?
Only you can really know. You need to take a total inventory and see if there are medications or drugs you can live just fine, without.
I have already trimmed my list down, and Well I only really started smoking in my later 40's and have been smoking moderately for a few years and it actually helps at times.
So I am down to an upper single digit number of meds and substances, and cutting out vitaminD which I only take occasionally is all I am left with cutting out at this point.( ok, I could live without cigarettes but quitting sucks).
So, my advice is to take a real hard honest look at all your meds( from your past descriptions it is a lot and it seems many are needed).
You maybe stuck, on being on all sorts of meds. If you have mental health issues and from the sound of it, those that are needed, ( not an insult, mental disorders need to be treated) along with diabetes meds and any other medically needed drugs).
So it seems like cigarettes and coffee are possible all that are left.
Unless you you are also taking any rather useless drugs that you can live without.
You might just be stuck taking a ton of meds to live as good of a life as possible, medically.
In your case, quitting smoking maybe one of the few things you can cut out. Good luck with that one,lol Sorry, I smoke also and for some reason I only smoke in one room of my house. I literally can be out all day with no cigarettes and not even think about them. I use a machine and make my own and only smoke in the main place I spend my time awake indoors. If I am upstairs for half a day I might not smoke until I go to that one living room. It is psychological, but If I were to leave my house for a week I would probably be able to quit easily.
So basically, you need to take a realistic inventory of all your meds and any substances and see what you can live without. It maybe several or it maybe just the cigarettes.
Coffee is not really that bad as long as you don't drink a lot of it and find yourself with no available caffeine; then OUCH big time.
But if there are drugs that are useless and you can cut them out, then I would do so.
If there are none, then I guess you are kinda stuck.
As a side note; the taking of pills almost becomes like this weird ritual for old people. I hate that image. But if you can cut out some unnecessary substances or drugs, then I would do so. If not, then fire up a cancer stick and learn to accept that this is what you are stuck with.
Seriously, good luck and don't discontinue any necessary medications.