Elderly dog ☹️

My dog is 13 years old, and he’s had arthritis/hip dysplasia for a while. In the past few days it seems like his health is rapidly declining. He seems to get stuck on the floor. Like yesterday he would try to get up, but couldn’t (eventually he did but he wouldn’t go outside to pee/poop), but today he’s barely even tried to get up. My dad had to drag him outside today on a blanket and my dog bit him pretty badly (he bled). When he’s awake, all he does is lay there and bark or whine. We’ve been bringing him water and food, and his medicine he takes for pain. It doesn’t seem like he’s in a right state of mind either. Tonight, I was trying to walk past him (he was laying in the hall) and he snapped at me a few times like he thought I was gonna hurt him. It really upsets me because just a few days ago we were outside in the backyard and he was mobile and seemingly happy. We’re going to make a vet appointment first thing Monday morning. I know he’s probably going to need to be put down and I understand because I don’t want him to suffer, but I will miss him. He’s the only dog I’ve ever had. Anyone who’s lost a pet in the past have any tips/words of wisdom?