I hope you don’t find what I'm about to say glib. I don’t mean it that way. I truly believe that you can find meaning through shifting your focus from inside to outside yourself. I say this only because this has benefits to me. I realize that may not mean it works for you, but I hope it will.
Try giving freely of your talents to others. You mention your math career. Try finding people who struggle with math and tutor them. For free. Start slow & easy, and focus on their growth not yourself.
I also encourage you to unplug and find ways to reconnect with nature. Walks where you do nothing but notice the colors of the flower petals, or the rippling of the water. No distractions. Just practicing on focusing outward with no expectations.
I hope you can find some meaning in this crazy life. Sometimes I resort to a pascal style wager - this is by definition my only shot at life, so why not try and see what happens?