so basically all i have is this image from a final scene of some movie stuck in my mind. it was a 2010s crime movie of sorts, and the main character was not a good guy (i think he killed someone, but there’s also a very small possibility that he was a corrupt cop and hid the evidence or something), and he also had a cat or a dog that died later in the movie. so i think the main plot is him contemplating about this bad thing he’s done and the final scene is him driving to some tree at night, digging something underneath the tree with a folding shovel and crying, and the viewers are left to wonder if he is digging a grave for his late pet or undigging a body/evidence/whatever to confess to what he’s done.
Tyrannosaur (2011)?
https://www.imdb.com/title/tt1204340/?ref_=fn_al_tt_1