He realizes he needs to take his own advice
The entire movie, Sean has been basically telling Will that he needs to get out and experience things for himself instead of being a know it all. Sean has been out there and experienced life but Will hasn't. His entire wealth of knowledge comes from books.
At one point they have an argument where Will throws this in Sean's face:
Will: Dead! She dies and you just cash in your chips. That's a fuckin' cop-out!
Sean: I've been there. I played my hand.
Will: That's right. And you fuckin' lost! And some people would have the sack to lose a big hand like that and still come back and ante up again!
Sean: You and your bullshit. You got an answer for everybody. But I asked you a straight question and you can't give me a straight answer. Because you don't know.
Will criticizes Sean for giving up after he lost his wife, but Sean comes right back at him. He may have taken a risk and been hurt and given up, but at least he's been out there and tried.
Later in the movie, Will has finally taken Sean's words to heart ad we find out that Sean has also taken Will's crticism to heart and has decided to take his own advice and start experiencing life again.
Sean: I'm gonna travel a little bit, so I don't know where I'll be.
Will smiles.
Sean: I just... figured it's time I put my money back on the table, see what kind of cards I get.
Will smiles. Sean hands him a piece of paper.
Sean: I'll be checking in with my machine at the college. If you ever need anything, just call. Do what's in your heart, son. You'll be fine.
Will: Thank you, Sean.
Sean: No. Thank you.
Helping others is a common way to cope with depression
On a personal level, I would like to add that Sean gains a level of personal satisfaction from being able to help Will and this has a great affect on him and his depression. Helping other people is a common method that people use to cope with depression and I can say that it is very effective.