Dispose the dead rat
You can get rid of the terrible smell by removing the dead body of the rat, of course. Cover your face with a mask and crawl under the different parts of your house in order to find the dead rat. Once you find the dead rat, wear disposable gloves, and transfer it into a plastic bag. Now, remove it and dispose of it properly.
Open windows and doors
Open up all windows and doors around the affected area in order to allow exchange of gases. In case if the weather does not permit the opening of door and windows, simply switch on the exhaust fan or a ceiling fan.
Place onion slices in the affected area
Onion slices are good in absorbing the smell of dead rat. What you have to do is, just grab a large onion, and cut it into medium slices. Now, place few of the onion slices on disposable plates and set them in different parts of your house from where you want to get rid of the irritating smell. Make sure to let the onion slices sit overnight and see the difference.
Place vinegar bowls in the affected area
Remove the onion slices from different parts of your house early in the next morning. Now, take few small mixing bowls and fill them with vinegar. Place the bowls in the affected area of your house and leave it for at least 24 hours. Vinegar is also effective remedy that is useful to get rid of the odor.
Spray air freshener
Remove the vinegar bowl after 24 hours and spray any of your favorite air freshener in order to remove the remaining smell of the dead rat. Make sure to spray the air freshener after every two hours until you get rid of the nasty smell.