It is written “they have abandoned Me and have not observed My Torah” (Jeremiah 16, 11)
G-d says “if only Me they would abandon but My Torah they would observe.” G-d declares that it would be better not to believe in G-d but to observe Torah.
What is the source for this Midrash?