Please don't list this on a work's page as a trope. Examples can go on the work's YMMV tab.
Tear Jerker: Brave Police J-Decker
There are many in the series. Hell, the series starts with Deckerd, who has already known Yuuta for six months, getting his memory re-formatted. Think about what that usually means for a computer, and therefore to a sapient one.
How about when Deckerd got destroyed on Duke Fire's debut? clip here.