Preheat the oven to 180°C/160°C fan and grease and line a large loaf tin (the one I used measured approx. 25 x 12cm).
Whisk together the self raising flour, baking soda and xanthan gum (if adding) in a mixing bowl until well combined.
In another large bowl, beat together the butter and sugar until pale and fluffy. You can also do this in an electric stand mixer.
Add an egg, followed by a tablespoon of the flour mixture and beat to combine. Repeat twice more with the remaining eggs. Adding the flour with each egg prevents the mixture from curdling.
Mix through the lemon zest and yoghurt.
Sprinkle a little of your flour mixture over the raspberries and toss them so they're well coated. This will stop the raspberries from sinking to the bottom of the cake.
Sieve the rest of the flour mixture into the bowl with the wet ingredients and gently fold everything together until just combined.
Add the raspberries and gently fold them through.
Transfer the mixture into your lined loaf tin and bake for about 1 hour. It make take a little longer depending on your oven and the exact size/shape of your tin. After 45 minutes, if the top of the cake is nicely browned, you can cover it loosely with foil to stop it browning any further. To check whether the cake is cooked, insert a skewer into the middle. It should come out clean or with just a few moist crumbs - not with wet cake mixture on it.