From a database in a system area of the phone, so you'll need to learn both SQL and Linux, and root the phone and ... you're probably already thinking that it's not worth it, right?
Assuming the Media Indexing Service is working correctly on your phone, a restart of the phone should cause the indexing service to remove the missing photos from the list.
I solved it. Those recent pictures were from my Google Drive. When i removed the account, they disappeared. Now i don't have to be curious where those pictures were from.