I often produce espresso that is bitter and sour.
The best coffee that I've drank for the past five years have all been pour overs (my favorite was at a place called The Library in Toronto). I sometimes wonder if all the time, effort, and money I've dumped into espresso has been a huge mistake and maybe I should just buy a pour over setup...
What you’ve hit is uneven extraction. Parts of the puck were over extracted and other parts under extracted.
Usually the cause is channeling, where some pathways in the coffee puck are easier for water to get through, so they get eroded first which leads to even more water going through these channels. Coffee around these channels then gets over extracted (bitter).
Conversely, much less water is reaching the other parts of the puck, leading to those parts getting under extracted (sour)
Better puck prep helps. Using a WDT tool (some acupuncture needles on a cork would do) or a blind shaker to break up the clumps leads to good results. Making sure the surface of the puck is level after tamping is a big one as well.
What also helps is going coarser in the grind. The coarser the grind, the less puck prep matters and the less channeling occurs. Warning, you’ll no longer be getting the thick crema you may associate with espresso, or the instagram worthy beautiful rat tail extractions. But the coffee produced from coarse grind espresso is IMO much better.
I was taught a lot of this by Lance Hedrick and I applied these learnings to achieve mostly consistent fruity and sweet espresso on most mornings.
Don’t forget that pour overs are usually a lighter roast than espresso. I like a sharper tasting vote and so usually use filter roasts (lighter) for my espressos.
Edit: and if you want a non-bitter coffee, skip the pour over and cold brew, and go straight for the cold drip (one drop every second over 24 hours). And when from the fridge, let it sit to get to room temperature - now you have a non-bitter, flavoursome coffee that has a whiskey mouth feel
You could get an OXO rapid brewer. It can make amazing espresso-intensity (TDS wise) drinks, and can be diluted to be as enjoyable as a pourover.
Also shoutout the library. Great shop
If your espresso is bitter and sour, you're getting uneven extraction. One reason for this includes channeling: water encountering a tightly-packed puck and boring a hole through it or even lifting the puck so that water flows around it. Channeling over-extracts the areas of the puck that experience a high flow rate and under-extracts the areas that experience low flow.
Channeling is usually caused by too fine of a grind. If your machine (I'm assuming it's a pump machine) is pegging the pressure gauge at max (and dumping excess pressure internally) and your coffee tastes unevenly extracted, you may want to try grinding coarser. Not only will this reduce channeling, it'll result in less fines in the cup, also reducing bitterness.
The best thing I ever did for my espresso was to give up on the rigid rules I was first taught as a beginner. I don't time my shots, I don't use fixed brew ratios, I do everything by feel (watching the pressure build and the coffee flow) and taste. I do use a scale (for weighing beans per dose and weighing shots for repeatability). I dial in by adjusting the coffee output rather than fiddling with the grind. I only set the grind once to get a reasonable pressure (6-9 bars, no maxing out or dropping off), then fine-tune the gram output.
The biggest insight I gained from this freestyle approach is that the standard 2:1 ratio is altogether wrong for most of the light-roasted coffees you get from specialty coffee roasters. They simply will not extract properly with that small amount of water. Grinding coarser and pulling a longer shot (sometimes called a "turbo shot") gives you a much better result.