I'm not sure I would say mine is "optimal", but it works very well for me and my play style. I use the cross hotbar with expanded controls to avoid congestion. Anything that gives a debuff that enemies may or may not be immune to (heavy, silence, etc.), I have on a the expanded controls hotbar.
Lead Shot, Split Shot, Slug Shot, and Clean Shot are all lined up, while my AoEs are also all together on my cross hotbar. Any damage buffs that I can apply are on one quarter, and then ammo-related buffs are on another quarter. So it looks like this, starting from the top and going clockwise:
SET I:
Left side: Quick Reload / Reload / Reassemble / Rapid Fire
Left side : Heartbreak / Raging Strikes and Hawk's Eye macro / Hot Shot / Wildfire
Right side: Blank and Foot Graze macro / Grenado Shot / Ricochet / Spread Shot
Right side: Split Shot / Slug Shot / Clean Shot / Lead Shot
R2 + L2 Left side: Silence / Heavy/ Bind/ Stun (I macro'd them to change the names so that I wouldn't be confused during combat)
R2 + L2 Right side: Limit Break / Gauss Barrel / Feint / Gauss Shot
L2 + R2 Left side: Keen Flurry / Rend Mind / Hypercharge / Dismantle
L2 + R2 Right side: Rook Autoturret / Bishop Autoturret / Promotion / Retrieval
My reasoning with the expanded controls was that, since my actual attacks are activated using the R2 side of my hotbar, my second attacks (such as Gauss Shot) should also be there for quick access. I'll already be holding that button if I need to quickly stun something, silence it, etc. Anything that I don't access as often is always on my left side, as well as on L2 + R2.
I also have a horizontal hotbar right above my cross hotbar for anything I couldn't fit in, but wasn't imperative (such as Quelling Strikes).
Again, this might not work for you, but I find that this setup keeps me busy and focused while still keeping things easily accessible. Hope that helps!