It's not dead, it's just the flowers are fading. This will have been intended as a temporary visitor in the home as a houseplant, because Hydrangea macrophylla is not in flower at this time of year without being forced (assuming you're in the northern hemisphere) but it will grow outdoors.
Certainly give it a larger pot (with drainage holes) using new potting soil, cut off the spent flowers and their stems, water the plant well after potting on and let it recover and grow on. Keep it watered regularly when the surface of the soil feels just about dry to the touch - it will prefer a part shade situation outdoors. You might get flowers this year, but more likely next year, and it will be better off in the ground from end of next year.