How do I make the filling in pain aux raisins / danish pastry
A few things that I think will solve your problem.


Use powdered sugar instead of granulated.  I find that makes for a much smoother end product and a silkier mouth feel.
Cream the butter and sugar together first and then add the nuts and other ingredients.  This will add some fluffiness as the creamed butter/sugar mixture will allow it hold a little more air.
Add another egg (or just an extra yolk). This will create a thicker end product and allow it to set harder at the end.
add almonds to a custard filling recipe.  You can side step your entire problem by picking out a pudding or custard recipe that fits what you want and adding course chopped almonds to it, or on top of it. It ain't authentic but it works every time.


Also: A link I found that most closely resembles the way I make it, that might help you out.