There is another type of OPT, after you finish all you course work, and when only the thesis is left, you can apply for pre-OPT. I don't know if your OPT can be treated as pre-OPT, but I think it should; if this is the case, it should be valid until it expires next February. You need to talk to your international student office, find a nice person, their job is to help international students. You should also be able to get a F-1 extension, if you can provide a good justification, and if you major professor signs an agreement. You still plan to graduate from this school, right?